Create table works, create materialized view only - long column names?
Hello.I have no probs creating a table as well: -.
CREATE TABLE blah
(
DEVICE_ID
)
in select
"Device_ID" AS DEVICE_ID
"of"sum" Device"@ed_link_3
where "Device_ID" < 5;
But when I try to create a materialized view:
Blah1 CREATE MATERIALIZED VIEW
(
DEVICE_ID
)
< various materialized view parms >
in select
"Device_ID" AS DEVICE_ID
"of"sum" Device"@ed_link_3
where "Device_ID" < 5;
It fails with errors: -.
ORA-04052: error occurred when searching to the top of the remote object Aggregate.Device@ED_LINK_3
ORA-01948: length of the name of the identifier (31) exceeds maximum (30)
Is there a way to get around this?
Is the problem with the columns of the remote table of device, which I do NOT need to import to have column names that are longer than 30 characters?
For now, I want only the Device_ID column which is a simple 9 characters long.
Oh, and the remote database is MySQL.
I'm uncomfortable with the < parms of materialized view > as they work fine when I choose a different remote table with only short column names.
Thank you.
To my knowledge, you have the option
(a) create view (with shortened column names or only with desired columns if they are already less than 30 char limit) side of mysql
(b) use dbms_passthrough to force the analysis to be done on mysql (as in the example provided by SY here use dbms_passthrough to create a view )
However, I prefer to stick to one), because with dbms_passtrhough, you retrieve row by row.
Best regards
Maxim
Tags: Database
Similar Questions
-
Create Materialized View ORA-01723: columns of length zero are not allowed
I am trying to create a materialized view that derives from a column of a function and I get: ORA-01723: columns null are not allowed.
I use 10 gr 2 with the following definition (simple version):
CREATE MATERIALIZED VIEW ACES
SELECT
function_name (column_name) alias_de_colonne
FROM table_name;
I even tried to cast it as below:
CREATE MATERIALIZED VIEW ACES
SELECT
Cast (function_name (column_name) AS VARCHAR2 (200)) alias_de_colonne
FROM table_name;
My function has an exception to return a value, even if no value are.
I looked everywhere for the solution. Someone at - there a way around this problem? I really need my function to calculate the column because it has business rules that I can't join in my definition of the materialized view. My only hope around this is to insert values into a table and then create a materialized table view, I don't want to do that if someone has a solution around this.
Any help would be greatly appreciated.
Thank you
Kyle
Published by: Kyle Miller on April 19, 2011 08:28Have you tried to create a table with the correct structure and then by creating the view materialized, based on the predefined table as described here...
http://www.oaktable.NET/content/ultra-fast-MV-alteration-using-prebuilt-table-option
?
See you soon
Ben
-
create materialized view log on the table without a primary key
Hi all
I don't want to refresh the mview when validation is performed on the base table.CREATE TABLE client_months ( SUBJ_CODE NUMBER(4), SERV_CODE NUMBER(4), DEBIT_CODE NUMBER(4), PERIOD_NUM NUMBER(2), PERIOD_NAME VARCHAR2(40 CHAR), FIRST_MON_DAY DATE, LAST_MON_DAY DATE, VALUE_MON_DAY DATE, MONTHES NUMBER(4,2), GARDENING_WEIGHT NUMBER(5,4), REASON_CODE NUMBER(5), STAMP_ACTION VARCHAR2(1 CHAR), STAMP_CDATE DATE DEFAULT SYSDATE, STAMP_DATE DATE, STAMP_USER VARCHAR2(15 CHAR), REGION_CODE NUMBER(9) ) table created. CREATE UNIQUE INDEX client_months_UK ON client_months (SUBJ_CODE, SERV_CODE, DEBIT_CODE, PERIOD_NUM, REGION_CODE) index created. CREATE MATERIALIZED VIEW LOG ON client_months with rowid; CREATE MATERIALIZED VIEW client_months_mv BUILD immediate REFRESH FAST ON COMMIT AS SELECT * FROM client_months; ORA-12014: table 'CLIENT_MONTHS' does not contain a primary key constraint
And I don't want to change the base table by adding a primary key.
is it possible to create the mview journal using the unique index? or another solution?
Please help
Thanks in advance
NaamaNaamas wrote:
No,
I already read this post!Then you read wrong:
SQL> CREATE TABLE client_months 2 ( 3 SUBJ_CODE NUMBER(4), 4 SERV_CODE NUMBER(4), 5 DEBIT_CODE NUMBER(4), 6 PERIOD_NUM NUMBER(2), 7 PERIOD_NAME VARCHAR2(40 CHAR), 8 FIRST_MON_DAY DATE, 9 LAST_MON_DAY DATE, 10 VALUE_MON_DAY DATE, 11 MONTHES NUMBER(4,2), 12 GARDENING_WEIGHT NUMBER(5,4), 13 REASON_CODE NUMBER(5), 14 STAMP_ACTION VARCHAR2(1 CHAR), 15 STAMP_CDATE DATE DEFAULT SYSDATE, 16 STAMP_DATE DATE, 17 STAMP_USER VARCHAR2(15 CHAR), 18 REGION_CODE NUMBER(9) 19 ) 20 / Table created. SQL> CREATE UNIQUE INDEX client_months_UK ON client_months 2 (SUBJ_CODE, SERV_CODE, DEBIT_CODE, PERIOD_NUM, REGION_CODE) 3 / Index created. SQL> CREATE MATERIALIZED VIEW LOG ON client_months with rowid 2 / Materialized view log created. SQL> CREATE MATERIALIZED VIEW client_months_mv 2 BUILD immediate 3 REFRESH FAST WITH ROWID ON COMMIT -- pay attention to WITH ROWID 4 AS 5 SELECT * FROM client_months 6 / Materialized view created. SQL>
SY.
-
Create Materialized view and Materialized view log.
I wanted to create a materialized view with option "REFRESH QUICKLY YOU COMMIT".
(1) table 1 - it is partitioned range + list - added primary key
(2) View1 - having primary keys on the base table of view
Steps to follow:
(1) create the materialized on Table1; view journal -primary key by default
(2) create the materialized on view1 view log. -It gives below error.
ORA-00942: table or view does not exist
I wanted to create Materialized view as below
create a materialized view
Quickly REFRESH ON validation
as
Select...
........
... from table1
where c1 (select c1 from View1 which...);
Question:
(1) because I am getting above error when creating journal of MV on the view. Can one create log view MV or we create a MV newspaper on the base table of view?
(2) to create the MV with "REFRESH QUICKLY YOU COMMIT' option, we need to have the primary key on the main tables?
Pointers on this will be really useful.
Thank you
Prasad
"When a materialized view is maintained by the
ON
COMMIT
method, the time required to perform the validation can be slightly longer than usual." This is because the refresh operation is performed as part of the validation process. This is why this method may not be suitable if many users at the same time change the tables on which is based the materialized view. »See: basis of materialized views (refreshment options) for all the other options and how they work.
-
'Invalid metadata objects' when creating materialized views
Hi experts,
I ran into some trouble. I had an analytic workspace that has grown too quickly (see 11.2.0.2 size AW grows regularly with each generation of cube so I deleted and created a new.)
He seemed to do very well with the tip David Greenfield, gave us in the mentioned forum post, but when I try to activate materialized views (that I had activated in the previous workspace) I am gettig the following error:
-----
Your metadata changes have been saved, with the following errors
Invalid metadata objects:
Invalid object "TABLESPACE. LECTURAS': 'CREATE A MATERIALIZED VIEW 'TABLESPACE' '. "CB$ LECTURAS.
ORGANIZATION OF CUBE ON THE TABLESPACE. () TABLESPACE_AW
MADE "LECTURAS_STORED"("LECTURAS_MEASURE_DIM" "LECTURA") IS "LECTURA"
DIMENSION "TIEMPO" IS "TIEMPO", WITH THE HELP OF "TIEMPO_TIEMPO_HOUR_ID_UNIQUE_KEY."
DIMENSION 'GEOGRAPHY' IS 'GEOGRAPHY' WITH THE HELP OF 'GEOGRAFIA_GEOGRAFIA_CONTADOR_ID_UNIQUE_KEY')
POSTPONED BUILD
UPDATE ON REQUEST
FORCE
WITH THE HELP OF CONSTRAINTS OF TRUST
AS
(
SELECT
TO_CHAR (T1." FEC_LECTURA', "dd/mm/yyyy hh24:mi:ss") "TIEMPO"
T1. "" COD_METERID ""GEOGRAPHY. "
SUM (T1." VAL_AI_HOR') "LECTURA".
Of
TABLESPACE. "' LECTURA_HORARIA_FINAL ' T1
GROUP BY
(TO_CHAR (T1." (FEC_LECTURA"," hh24:mi:ss dd/mm/yyyy '), T1. ("' COD_METERID")
)
ORA-00942: table or view does not exist
"
-----
This same script running in SQLDeveloper gives the same error in line 17, which is the FROM clause. BUT I can run the select by itself and returns the expected result. If the table exists in the correct storage space.
I must be missing something big...
Thanks in advance.
Joan
P.S.: In the above code I use 'SPACE' to replace the real name from username and a tablespace (which is the same) for reasons of confidentiality.When you run the select statement, you connect to the same user you are trying to activate the VM?
You can create a standard (No cube) MV with the same select statement? (Connected to the same user that you used in AWM).
"CREATE MATERIALIZED VIEW "TABLESPACE"."MV_TEST" BUILD DEFERRED REFRESH ON DEMAND FORCE USING TRUSTED CONSTRAINTS AS ( SELECT TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') "TIEMPO", T1."COD_METERID" "GEOGRAFIA", SUM(T1."VAL_AI_HOR") "LECTURA" FROM TABLESPACE."LECTURA_HORARIA_FINAL" T1 GROUP BY (TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') , T1."COD_METERID") ) {code}
-
Bug: Cannot create materialized view log on XE 11 G
Hello
I connect as try and HR user create materialized view log
I get the errorCREATE MATERIALIZED VIEW LOG ON HR.EMPLOYEES;
>
Error from the 1 in the command line:
CREATE LOG VIEW MATERIALIZED ON HUMAN RESOURCES. EMPLOYEES
Error in the command line: 1 column: 0
Error report:
SQL error: ORA-00439: feature not enabled not: Advanced replication
00439 00000 - "function not enabled: %s."
* Cause: The specified feature is not enabled.
* Action: Try not to use this feature.
>
You can create a materialized view log on 10G XE with no problems.
Kind regards
Jari
http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0Is this a bug in 11g or 10g?
It was reported earlier in the beta forum now archived. {: identifier of the thread = 2214092}
The current doc lists the MV sites only (and 'No' to the function of replication advanced):
http://download.Oracle.com/docs/CD/E17781_01/license.112/e18068/TOC.htm#BABDFDAI -
Hello
I found that when oracle executes the create materialized view statement it must be longer than the duration of execution of the actual query.
I do an IMMEDIATE CONSTRUCTION.
Is there a reason for this?
For example. the query in the create statement took 25 minutes and did not create the MV for 2 hours.
The following query, which took 10 seconds was not created during more than 11 minutes and is still ongoing.
So I want to know what the reason is behind this? pls share if you know... Thank you.
PS:
I have advice in the select query. Oracle uses it advice during the creation of MV too or is this the reason why it's taking the time to build the MV?
any suggestion is appreciated. thnks!
Published by: user254668 on January 11, 2011 08:08How do measure you queries?
http://jonathanlewis.WordPress.com/2010/08/29/fair-comparison/
Re: Question Performace and Order by
Re: receiving ORA-01722 invalid number mistake while creating a materialized view
Re: long term with ORDER by clause
Re: Improve the performance of the query with the order of -
Cannot create Materialized View using the PL/SQL procedure
Hello
I have a question related to the creation of materialized view.
I have a stored procedure that creates the materialized view. When you try to perform this procedure, I get not enough privileges error: ORA-01031.
When I run the content of this procedure as a PL/SQL block anonymous their materialized view is created without any complications.
Can you please advice me on this subject?
It is even possible to create a materialized view in the stored procedure as I found no info on this subject.
Thank you
PetrHi chudapet,
Whenever you make in procedure, you must have direct subsidies and not through a role.
Most likely the grant to create a materialized view is available via a role to your username.
Assign a direct grant to the user:grant create materialized view to scott; {code}
-
I need to create a view-only PDFs that cannot be printed, copied, transmitted or recorded electronically. I see the security settings for printing, but I'm still able to record and transmit the record. Is there a way to do this? I have Acrobat 7.0 Standard. Thank you.
You can do everything with security Acrobat except the file forward. Registration may be restricted, but is only the changes. When a PDF file is downloaded to see, it's a machine (usually in the TEMP folder). If you want to restrict the use, you are talking about an expensive solution with DRM LiveCycle process. Acrobat itself cannot restrict the availability of the PDF file. If this is of concern, then you can trust the user, not forward it or use DRM.
-
With as subquery block in create MATERIALIZED view or bulk pl/sql
Hi all
Can I use the with as subquery block in create MATERIALIZED view?
or in pl/sql
-Thank you
Published by: xwo0owx on March 31, 2011 11:23
Published by: xwo0owx on March 31, 2011 11:23Have you tried to test it? :)
SQL > SELECT * FROM V$VERSION; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production PL/SQL Release 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS for 32-bit Windows: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production SQL > CREATE VIEW TEST_VIEW 2 AS 3 WITH d AS 4 ( 5 SELECT * FROM DUAL 6 ) 7 SELECT * 8 FROM d 9 ; View created. SQL > SELECT * FROM test_view; D - X SQL > DECLARE 2 x DUAL.DUMMY%TYPE; 3 BEGIN 4 WITH d AS 5 ( 6 SELECT * FROM DUAL 7 ) 8 SELECT dummy 9 INTO x 10 FROM d 11 ; 12 13 DBMS_OUTPUT.PUT_LINE(x); 14 END; 15 / X PL/SQL procedure successfully completed.
-
is missing a closing parenthesis in create materialized view statement
Hi, I am using oracle 10g R2 and try to create a view of materalized with the following statement:
but I get an error message:CREATE MATERIALIZED VIEW MVT_DEC_TAB USING INDEX REFRESH FAST ON COMMIT AS select i.rowid as ind_rowid,c.rowid as indc_rowid,r.rowid as r_rowid,b.rowid as b_rowid,brk.rowid as brk_rowid, i.name,i.sname,i.address,i.tel,i.fax,i.email, DECODE(c.BRKNO,null,0,1) AS DEC_BRK, TO_TIMESTAMP(NVL(VEKDOV,'2001/01/01')||' 12:00:00','YYYY/MM/DD HH:MI:SS'), DECODE(c.brkno,null,DECODE(c.ncmpcode,null,c.vekdov,b.bcarddov),brk.validitydov) from indiv i,indivcoding c LEFT OUTER JOIN BROKER brk ON brk.brkno = c.brkno LEFT OUTER JOIN CORPORAT r ON c.ncmpcode=r.cmpcode INNER JOIN BCARD b ON b.bcardno=r.bcardno where c.typeact=2 and c.natcode=i.natcode and c.brkno is not null or c.ncmpcode is not null or c.nnatcode is not null
where c.typeact = 2
ERROR on line 11:
ORA-00907: lack of right parenthesis
which makes no sense because if I run the sql code of the materialized view, it runs normally.
I need to know what the causing this can someone help?Do not use the "LEFT OUTER JOIN" ANSI syntax in your CREATE MATERIALIZED VIEW definition.
SpecifyFROM indiv i,indivcoding c, broker brk, corporat r WHERE brk.brkno(+) = c.brkno AND c.ncmpcode(+) = r.cmpcode
OR
FROM indiv i,indivcoding c, broker brk, corporat r WHERE c.brkno = brk.brkno(+) AND r.ncmpcode = c.cmpcode(+)
(I find it more readable).
Hemant K Collette
-
change the source tables in the materialized view
If I change the name of the source table in a materialized view, I have to delete and recreate the MV? For example, My MV uses a table from a DBlink. Instead I want to physically copy the table in the schema, and then create the MV using the local table, then change MV to use the remote table and I expect to start refreshing the MV for incremental data. Can I do it?
No, you can't. Oracle has no way of knowing that the modified table (name) is identical to the original table.
Hemant K Collette
-
Create materialized view at the trigger.
Hello
I use version below:
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
PL/SQL Release 11.2.0.1.0 - Production
I created a materialized view query below:
CREATE THE FSG1_FUND000 MATERIALIZED VIEW
PCTUSED, PCTFREE 5 70
Users TABLESPACE
STORAGE (INITIAL 500K NEXT 500K)
Refresh a start fast with (sysdate) next (sysdate + (1 / 1440))
WITH rowid
AS
SELECT * FROM ABNDEV_T24. FSG1_FUND000@abndev;
This Mview if any insert or update only (WITHOUT DELETING) are coming which should be copy to another table. But in mView trigger does not work.
So pls advice me no alternative.
Querys trigger:
create or replace trigger trg_dummy
after insert or update on FSG1_FUND000
for each line
Start
If the insertion
insert into FSG1_FUND001 (RECID, XMLRECORD) values (: new.) RECID,: new. XMLRECORD);
elsif update then
insert into FSG1_FUND001 (RECID, XMLRECORD) values (: new.) RECID,: new. XMLRECORD);
end if;
end;
/
Kind regards
Villa
Hello
I learned and referred website as much as we can not able to create a trigger in MView (sorry we create trigger but none use of creation because in view no insert and update happened). So I drop completely the materialized view concepts and relaxation.
Instead of, I have using the procedure to insert records in a table and then I created one by dbms_scheduler job.
This discussion will be useful for any future reference.
-procedure-
create or replace procedure p2
as
Start
INSERT / * + APPEND * / INTO FSG1_FUND000 SELECT * FROM FSG1_FUND000@remote;
End; BluShadow
/
-----------------job--------------------
Begin
DBMS_SCHEDULER. () CREATE_JOB
job_name-online "JOB4."
job_type-online "PLSQL_BLOCK."
JOB_ACTION => ' BEGIN p2; END;',
start_date => SYSDATE,
repeat_interval => ' FREQ = MINUTELY; INTERVAL = 5;',
End_date => NULL,
-Online TRUE, enabled
comments => "Inserting a record in a table");
end;
/
-
performance of the queries on the main tables of the materialized view vs
Hello
I'm afraid of strange behavior in db, on my paintings of master UDBMOVEMENT_ORIG (26mil.rows) and UDBIDENTDATA_ORIG (18mil.rows) is created the materialized view TMP_MS_UDB_MV (UDBMOVEMENT stands for this object) that meets certain default conditions and the join on these paintings of master condition. MV got on the lines of 12milions. I created MV for poll not so huge objects, MV got 3GB, paintings of master toghether 12 GB. But I don't understand that physical reads and becomes compatible is less on MV that on the main tables, the final execution time is shorter on the master tables. See my journal below.
Why?
Thanks for the replies.
SQL > set echo on
SQL > @flush
SQL > alter system flush buffer_cache;
Modified system.
Elapsed time: 00:00:00.20
SQL > alter system flush shared_pool;
Modified system.
Elapsed time: 00:00:00.65
SQL > SELECT
UDBMovement.zIdDevice 2, UDBMovement.sDevice, UDBMovement.zIdLocal, UDBMovement.sComputer, UDBMovement.tActionTime, UDBIdentData.sCardSubType, UDBIdentData.sCardType, UDBMovement.cEpan, UDBMovement.cText, UDBMovement.lArtRef, UDBMovement.sArtClassRef, UDBMovement.lSequenz, UDBMovement.sTransMark, UDBMovement.lBlock, UDBMovement.sTransType, UDBMovement.lGlobalID, UDBMovement.sFacility, UDBIdentData.sCardClass, UDBMovement.lSingleAmount, UDBMovement.sVAT, UDBMovement.lVATTot, UDBIdentData.tTarifTimeStart, UDBIdentData.tTarifTimeEnd, UDBIdentData.cLicensePlate, UDBIdentData.lMoneyValue, UDBIdentData.lPointValue, UDBIdentData.lTimeValue, UDBIdentData.tProdTime, UDBIdentData.tExpireDate
UDBMOVEMENT_orig UDBMovement 3, Udbidentdata_orig UDBIdentData
4. WHERE
5 UDBMovement.lGlobalId = UDBIdentData.lGlobalRef (+) AND UDBMovement.sComputer = UDBIdentData.sComputer (+)
6 AND UDBMovement.sTransType > 0 AND UDBMovement.sDevice < 1000 AND UDBMovement.sDevice > = 0 AND UDBIdentData.sCardType IN (2) AND (bitand(UDBMovement.sSaleFlag,1) = 0 AND bitand(UDBMovement.sSaleFlag,4) = 0) AND UDBMovement.sArtClassRef < 100
7 AND UDBMovement.tActionTime > = TO_DATE (May 5, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss') + 0.25 AND UDBMovement.tActionTime < TO_DATE (May 5, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss') + 0.5
8 ORDER BY tActionTime, lBlock, lSequenz;
4947 selected lines.
Elapsed time: 00:00:15.84
Execution plan
----------------------------------------------------------
Hash value of plan: 1768406139
------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |
------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 7166 | 1238K | 20670 (1) | 00:04:09 |
| 1. SORT ORDER BY | 7166 | 1238K | 1480K | 20670 (1) | 00:04:09 |
| 2. NESTED LOOPS |
| 3. NESTED LOOPS | 7166 | 1238K | 20388 (1) | 00:04:05 |
|* 4 | TABLE ACCESS BY INDEX ROWID | UDBMOVEMENT_ORIG | 7142 | 809K | 7056 (1) | 00:01:25 |
|* 5 | INDEX RANGE SCAN | IDX_UDBMOVARTICLE | 10709. 61 (0) | 00:00:01 |
|* 6 | INDEX UNIQUE SCAN | UDBIDENTDATA_PRIM | 1 | | | 1 (0) | 00:00:01 |
|* 7 | TABLE ACCESS BY INDEX ROWID | UDBIDENTDATA_ORIG | 1. 61. 2 (0) | 00:00:01 |
------------------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
4 - filter("UDBMOVEMENT".") STRANSTYPE"> 0 AND 'UDBMOVEMENT '. "" SDEVICE ' < 1000 AND
BITAND ("SSALEFLAG", 1) = 0 AND "UDBMOVEMENT". "" SDEVICE ' > = 0 AND BITAND ("UDBMOVEMENT". "SSALEFLAG «(, 4) = 0)" "
5 - access("UDBMOVEMENT".") TACTIONTIME' > = TO_DATE (' 2011-05-05 06:00 ',' syyyy-mm-jj)
('HH24:mi:SS) AND "UDBMOVEMENT". "' TACTIONTIME ', TO_DATE (' 2011-05-05 12:00 ',' syyyy-mm-jj)
('HH24:mi:SS) AND "UDBMOVEMENT". ("' SARTCLASSREF" < 100)
filter ("UDBMOVEMENT". "SARTCLASSREF" < 100)
6 - access("UDBMOVEMENT".") LGLOBALID "=" UDBIDENTDATA. " "" LGLOBALREF "AND
'UDBMOVEMENT '. "' SCOMPUTER"="UDBIDENTDATA." ("' SCOMPUTER")
7 - filter("UDBIDENTDATA".") SCARDTYPE "= 2)
Statistics
----------------------------------------------------------
543 recursive calls
0 db block Gets
84383 compatible Gets
4485 physical reads
0 redo size
533990 bytes sent via SQL * Net to client
3953 bytes received via SQL * Net from client
331 SQL * Net back and forth to and from the client
kinds of 86 (memory)
0 sorts (disk)
4947 lines processed
SQL > @flush
SQL > alter system flush buffer_cache;
Modified system.
Elapsed time: 00:00:00.12
SQL > alter system flush shared_pool;
Modified system.
Elapsed time: 00:00:00.74
SQL > SELECT UDBMovement.zIdDevice, UDBMovement.sDevice, UDBMovement.zIdLocal, UDBMovement.sComputer, UDBMovement.tActionTime, UDBMovement.sCardSubType, UDBMovement.sCardType, UDBMovement.cEpan, UDBMovement.cText, UDBMovement.lArtRef, UDBMovement.sArtClassRef, UDBMovement.lSequenz, UDBMovement.sTransMark, UDBMovement.lBlock, UDBMovement.sTransType, UDBMovement.lGlobalID, UDBMovement.sFacility, UDBMovement.sCardClass, UDBMovement.lSingleAmount, UDBMovement.sVAT, UDBMovement.lVATTot, UDBMovement.tTarifTimeStart, UDBMovement.tTarifTimeEnd, UDBMovement.cLicensePlate, UDBMovement.lMoneyValue, UDBMovement.lPointValue, UDBMovement.lTimeValue, UDBMovement.tProdTime
2. OF UDBMOVEMENT WHERE
3 UDBMovement.sTransType > 0 AND UDBMovement.sDevice < 1000 AND UDBMovement.sDevice > = 0 AND UDBMovement.sCardType IN (2) AND (bitand(UDBMovement.sSaleFlag,1) = 0 AND bitand(UDBMovement.sSaleFlag,4) = 0) AND UDBMovement.sArtClassRef < 100
4. AND UDBMovement.tActionTime > = TO_DATE (May 5, 2011 00:00:00 ',' the hh24: mi: ss' dd/mm/yyyy) + 0.25
5 AND UDBMovement.tActionTime < TO_DATE (May 5, 2011 00:00:00 ',' the hh24: mi: ss' dd/mm/yyyy) + 0.5 ORDER BY tActionTime, lBlock, lSequenz;
4947 selected lines.
Elapsed time: 00:00:26.46
Execution plan
----------------------------------------------------------
Hash value of plan: 3648898312
-----------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
-----------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 2720 | 443K | 2812 (1) | 00:00:34 |
| 1. SORT ORDER BY | 2720 | 443K | 2812 (1) | 00:00:34 |
|* 2 | MAT_VIEW ACCESS BY INDEX ROWID | TMP_MS_UDB_MV | 2720 | 443K | 2811 (1) | 00:00:34 |
|* 3 | INDEX RANGE SCAN | EEETMP_MS_ACTTIMEDEVICE | 2732 | 89 (0) | 00:00:02 |
-----------------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
2 - filter("UDBMOVEMENT".") STRANSTYPE"> 0 AND BITAND ("UDBMOVEMENT". "SSALEFLAG «(, 4) = 0 AND" "
BITAND ("SSALEFLAG", 1) = 0 AND "UDBMOVEMENT". ("' SARTCLASSREF" < 100)
3 - access("UDBMOVEMENT".") TACTIONTIME' > = TO_DATE (' 2011-05-05 06:00 ',' syyyy-mm-jj)
('HH24:mi:SS) AND "UDBMOVEMENT". "" SDEVICE ' > = 0 AND "UDBMOVEMENT". ' SCARDTYPE ' = 2 AND ".
'UDBMOVEMENT '. "" TACTIONTIME "< TO_DATE(' 2011-05-05 12:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
'UDBMOVEMENT '. ("' SDEVICE ' < 1000)
filter ("UDBMOVEMENT". "SCARDTYPE"= 2 AND "UDBMOVEMENT"." SDEVICE' < 1000 AND
'UDBMOVEMENT '. ("' SDEVICE ' > = 0)
Statistics
----------------------------------------------------------
449 recursive calls
0 db block Gets
6090 gets coherent
2837 physical reads
0 redo size
531987 bytes sent via SQL * Net to client
3953 bytes received via SQL * Net from client
331 SQL * Net back and forth to and from the client
168 sorts (memory)
0 sorts (disk)
4947 lines processed
SQL > spool off
Published by: MattSk on February 4, 2013 14:20>
The second query makes a full table of materialized view scan.
>
What you base that statement on?I do not see any table full scan in terms of the second query. All I see is
>
* 2 MAT_VIEW ACCESS BY INDEX ROWID TMP_MS_UDB_MV 2720 443K 2811 (1) 00:00:34 -
Generate the ddl to create materialized view log...
Hi gurus...
Oracle db: 11g
I am trying to generate / excerpt from script MVIEW Logs from prod to be applied on the test.
I tried
< code >
DBMS_METADATA. GET_DDL (decode(object_type,'materialized_view_log'), object_name, owner)
from dba_objects
where owner = < ABC >;
< code >
above fails, any ideas?
Thank you>
Oracle db: 11gI am trying to generate / excerpt from script MVIEW Logs from prod to be applied on the test.
I tried
dbms_metadata.get_ddl(decode(object_type,'materialized_view_log'), object_name, owner)
from dba_objects
where owner=;
above fails, any ideas?
>
Please try to use the tags in code, but you need to add.on the line before and the line after your code instead of what you are using. The object type names are case-sensitive so you need to use
DBMS_METADATA. GET_DDL ('MATERIALIZED_VIEW_LOG', object_name, owner)
Why are you using DECODE?
Maybe you are looking for
-
I can't launch Firefox.
When I try to launch Firefox, I simply will not open. I tried opening in Mode safe by holding Shift and clicking on Firefox - no luck.
-
How to check the status of the guarantee to my Tecra A9?
Hi I really don't know where to ask something else. Hope someone could help me pls. I have this laptop Tecra A9 for about two months and I have the paper with that said the FREE GUARANTEE EXTENSION up to 3 years I recorded on the Toshiba site and fil
-
'system' process in the Task Manager running @ 50 to 100%
Just reinstalled xp family and for some reason, the 'system' process in the Task Manager runs 100% gel about the custom of all the system let me download updates update freezes keyboard and touch pad and wont stop. tried to reinstall it 4 times same
-
Question of fluctuating speed video WRT320N
I have read a lot of posts on this forum and I have maybe there's no help for it, but I thought I'd try. Please read them all, as I have tried several things found on this forum. I have a WRT320N I bought several months ago. I seem to have problems
-
Windows network does not see my phone
Fellow travelers, My Samsung Galaxy 3 will connect to my Wi - Fi network and function well. It can access the internet. Send and receive emails, etc.. I'm still using Windows 7 Ultimate 64 bit. My problem is: I go to network devices and the phone