Query Regarding Materialized view invalid
Hi,
What is the reason for the Materialized view invalid.
Question is vague. Can you be more specific?
Similar Messages
-
Query Regarding Materialized View
Hi,
I have materialized view mv_test which is derived from a base table test. My question is if I modify any of the column width of table test,do it effect on materialized view refresh?If so what are the procedures I need to follow if I want to modify the base table column size?
Thanks
Henauser11253970 wrote:
Hi,
I have materialized view mv_test which is derived from a base table test. My question is if I modify any of the column width of table test,do it effect on materialized view refresh?Yes. (Materialized) View is nothing but a select statement that will get executed on the base table when the view is accessed. So, you don't have to do anything special on the view when you change the datatype of the base table.
If so what are the procedures I need to follow if I want to modify the base table column size?You don't have to follow any procedure as such. Just make sure your data in the base table does not get affected by the change ;-)
-Arun
>
>
Thanks
Hena -
Hi, i did a drop of a materialized view, the MV doesnt exist, but in the objects, the MV still appearing like an invalid object, and i need to create the MV again but i cant because i get the error that MV already exists. What can i do?
Hi, im using this drop stament:
drop materialized view DATOSAREASGEOGRAFICAS_MVW;
When i execute that stament i got this message materialized view DATOSAREASGEOGRAFICAS_MVW dropped.
The script to refer the object is:
select object_name||','||object_type||','||status
from obj
where object_name='DATOSAREASGEOGRAFICAS_MVW';
And the result is:
DATOSAREASGEOGRAFICAS_MVW,TABLE,VALID
DATOSAREASGEOGRAFICAS_MVW,MATERIALIZED VIEW,INVALID
If i try to create the MV again, using this script:
CREATE MATERIALIZED VIEW "DATOSAREASGEOGRAFICAS_MVW" ("IDAREAGEOGRAFICA", "NOMBRE", "IPID", "IDENTIFICADORUNICO", "GEOMETRIA", "IDEMPRESA", "IDTIPOAREAGEOGRAFICA")
BUILD IMMEDIATE
USING INDEX
REFRESH COMPLETE ON DEMAND
USING DEFAULT LOCAL ROLLBACK SEGMENT
USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE
AS
SELECT TO_CHAR(idcuenca) idareageografica, nombre, ipid, identificadorunico, geometria, idempresa, 1 idTipoAreaGeografica FROM cuencas
UNION ALL
SELECT TO_CHAR(idsubcircuito), nombre, ipid, identificadorunico, geometria, idempresa, 2 FROM subcircuitos
UNION ALL
SELECT TO_CHAR(idareatrabajo), nombre, ipid, identificadorunico, geometria, idempresa, 3 FROM areasTrabajo
UNION ALL
SELECT TO_CHAR(idareatrabajo), subzonas.subzona, ipid, identificadorunico, geometria, idempresa, 4
FROM areasTrabajo
INNER JOIN subzonas
ON subzonas.idSubzona = areasTrabajo.idSubzona
UNION ALL
SELECT TO_CHAR(idareatrabajo), areasOperativas.areaOperativa, ipid, identificadorunico, geometria, idempresa, 5
FROM areasTrabajo
INNER JOIN areasOperativas
ON areasOperativas.idAreaOperativa = areasTrabajo.idAreaOperativa;
The result is
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 - "name is already used by an existing object"
*Cause:
*Action: -
Select query in materialized view with two dblinks
Hi All,
We have oracle 10g On windows.
We are trying to create materialized view. Scenario is we have base table on other database and we are creating mview on different database.
Basa database have two schema's and i am selecting records from that two schema's using two private db links.
But when i am tryin gto create mview its not getting created. After 15 hrs. its still showing creation command and not finished.
Query is :-
Is it good practice to have two db links in select query of materialized view.Billy Verreynne wrote:
Chanchal Wankhade wrote:
Is it good practice to have two db links in select query of materialized view.Same db link being used twice, or two different db links?
If the former, you ideally want the local Oracle db to send the join to the remote database, and for the remote database to drive the join between those 2 tables. There is a hint (<i>driving_site</i>) that can be used - or the join query can be defined on the remote database as a view, and the local materialised view can then use that remote view.
If you have 2 different db links and joining across these - usually a bad idea to perform distributed database joins. There are lots of limitations as to how the tables can be joined. Worse case, full table scans of both remote tables, pulling all the rows from the 2 remote database tables to the local database, and joining these on the local database.
I have seen some severe performance issues in the past as a result of distributed joins. I'll rather use 2 materialised views for pulling both distributed tables's data locally, and then do the join on local data (using indexes, partition pruning, etc)Hi Billy,
My scenario is i have two database database A and database B. Database A is having two schema's SCOTT AND HR. SCOTT schema have select privileges on HR schema.
DB LINK is between Database B to Database A. name is db.link.B.A.oracle.com.
What if i priovide while creating materialized view, the schema name before the table name in database B for this particuler table so it will pick up the table from that schema using same DB LINK(db.link.B.A.oracle.com.) that i am using to fetch records from SCOTT schema.
Above schnario is like two base schema's and one db link using two schema. -
Query on Materialized view and materialized view log
I am creating a materialized view something like this.but getting following error:
ERROR at line 1:
ORA-12032: cannot use rowid column from materialized view log on "SCOTT"."EMP"
SQL> create snapshot log on scott.emp;
Materialized view log created.
SQL> create materialized view scott_emp refresh fast on demand as select deptno,sum(sal) sum_sal from scott.emp group by deptno;
ERROR at line 1:
ORA-12032: cannot use rowid column from materialized view log on "SCOTT"."EMP"
Note when i have my query in materialized view as "select * from emp;" in place of
"select deptno,sum(sal) sum_sal from scott.emp group by deptno;" This code works fine.
How do i have a materialized with with a group by clause.
Thanks in AdvanceGot the answer myself.
I wasnt adding all the required columns.
CREATE MATERIALIZED VIEW LOG ON scott.emp
WITH SEQUENCE, ROWID (<all the required columns>)
INCLUDING NEW VALUES;
Anyways,
Thanks guys... -
Help regarding Materialized view ( subquery expression not allowed here )
Hi all,
while creating materialized view i got following error
ORA- 22818
subquery expression not allowed here
following is my query
CREATE MATERIALIZED VIEW MV_NAV_REC
BUILD IMMEDIATE
REFRESH COMPLETE ON DEMAND
as
select folio_no FOLIONO,CHKDIGIT as Check_Digit,sch_code SCHEMECODE, sysdate as FOLIODATE ,
(select case when count(distinct SUBBROKERCODE) =1 then to_char(max(SUBBROKERCODE)) else 'Multiple Broker' end from transaction_st
where folio_no = tst.folio_no
group by folio_no) ARN_Number ,
(select sum(case when tran_type in ('PURCHASE','SWITCH IN') then UNITS else 0 - UNITS end ) from transaction_st
where folio_no = tst.folio_no AND SCH_CODE = tst.sch_code
group by folio_no,sch_code) NUM_UNITS_NEW ,
--SUM (case when tran_type NOT in ('REDEMPTION','SWITCH OUT') THEN UNITS ELSE 0 - UNITS END ) AS Num_Units,
(select sum(case when tran_type in ('PURCHASE','SWITCH IN') then AMOUNT else 0 - AMOUNT end ) from transaction_st
where folio_no = tst.folio_no AND SCH_CODE = tst.sch_code
group by folio_no,SCH_CODE) as NUM_AMOUNT_NEW ,
--SUM (case when tran_type NOT in ('REDEMPTION','SWITCH OUT') THEN AMOUNT ELSE 0 -AMOUNT END ) AS Scheme_Amount,
sum( CASE WHEN upper(tran_type) NOT in ('REDEMPTION','SWITCH OUT') THEN
units * (select nav_rs from nav_rec where nav_rec.sch_code = tst.sch_code and nav_rec."Date" = /*trunc(sysdate)*/to_date('23/03/2009','dd/mm/yyyy'))
ELSE (0 - units) * (select nav_rs from nav_rec where nav_rec.sch_code = tst.sch_code and nav_rec."Date" = /*trunc(sysdate)*/to_date('23/03/2009','dd/mm/yyyy')) END ) Scheme_Valuation ,
null as SCHEMEPHRASEID ,
null as "Prefered Mode of SOA",
( select sum( case when upper(tran_type) NOT in ('REDEMPTION','SWITCH OUT') THEN AMOUNT ELSE 0 - AMOUNT END ) from transaction_st t where t.folio_no = tst.folio_no group by folio_no ) as Folio_Amount,
select sum(CASE when upper(tran_type) NOT in ('REDEMPTION','SWITCH OUT') THEN
units * ( select nav_rs from nav_rec where nav_rec.sch_code = ts.sch_code and nav_rec."Date" = /*trunc(sysdate)*/to_date('23/03/2009','dd/mm/yyyy'))
ELSE
(0 - units) * ( select nav_rs from nav_rec where nav_rec.sch_code = ts.sch_code and nav_rec."Date" = /*trunc(sysdate)*/to_date('23/03/2009','dd/mm/yyyy')) END
) from transaction_st ts where ts.folio_no =tst.folio_no group by ts.folio_no
) as Folio_Valuation
from transaction_st tst
group by folio_no ,sch_code,CHKDIGIT
order by folio_no , SCH_CODE
please help meHi,
You cannot use scalar subqueries in a materialized view.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4110947624538#22981269011674
edit
From 10g doc:
ORA-22818: subquery expressions not allowed here
Cause: An attempt was made to use a subquery expression where these are not supported.
Action: Rewrite the statement without the subquery expression.
(http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/e19400.htm#sthref6020)
Edited by: hoek on Jun 10, 2009 7:56 AM -
Help needed in query for Materialized View
Hi,
I want to create a materialized view which has some precalcultaed values.
I have four dimension tables out of which one is a Time Dimension table with levels as Year->Quarter->Month.
The precalculations are the moving averages and cummulative values of Sales Amt on the dimension values over a period of 4 Months.
The dimension tables are Clients, Products, Channel, Time.
Fact Table is Sales_Fact which will have the sales amount for different members of the dimension.
Since my fact table is very huge, i want to create a materialized view where i could store the required calculated measures, here Moving Average of Sales Amt for each Client, Product, Channel dimensions over a period of 4 Months.
Can anybody help with writing the query for this..Any help in this regard will be appreciated..
Please give me suggestions for this..Check this link.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/aggreg.htm#sthref1612
Regards
Raj -
Hi,
Materialized view can't be renamed, so how can I reduce the downtime for any new column addition in the materialized view.
Regards,
KoushikAgree with your reply.
I like to do the following steps assuming there is already a materialized view created on a base table :
1. Add any new column to the base table.
2. Drop and recreate the mlog table.
3. execute the statement "alter materialized view <mv_name> consider fresh" to simulate the error "ORA-12034: snapshot log on "<schema>"."<mv_name>" younger than last refresh"
4. Create a new MV with the additional columns and with a different name.
5. Drop the existing(old) MV.
6. Rename the new MV with the name of the old one.
Now this renaming is not possible. Is there any alternative way do the thing whatever I am trying to do by the above steps.
Can you please also tell me what is use of "ENABLE QUERY REWRITE" option during creation of a materialized view.
Thanks & Regards,
Koushik -
Help with sql query on materialized view logs
I am in need of a query to find out what tablespace and snap shot site a long list of materialized view logs are associated with.
something like below except tablespace and snap_shot_site are not an option for this table.
select log_owner, master, log_table, tablespace, snap_shot_site from dba_mview_logs;What is the refresh method set as?
Could you paste the full MV log creation script and the corresponding MV creation script. -
Query against materialized view from stored procedure brings back empty row
I have a stored procedure that runs a query against a materialized view. When I run the query outside the SP it works just fine. When I change the MV to a table name, the SP works. When I change it back to the MV i get an empty row. Any ideas? The code is below:
PROCEDURE getAuth (p_naid IN NUMBER,
p_scope IN VARCHAR2,
o_xml_data OUT SYS_REFCURSOR
) IS
BEGIN
IF p_scope = 'Approved' THEN
OPEN o_xml_data FOR
SELECT naid,
p_naid,
auth_type,
xml_data
FROM some_mv
WHERE naid = p_naid;
RETURN;
CLOSE o_xml_data;
... the rest of the procedure ...does procedure contain EXCEPTION handler?
if so, then remove, delete & eliminate EXCEPTION handler (at least during testing & debugging) -
UPDATING the query in materialized view
Hi,
i have a little doubt in Materialized view. i created a materialized view and log with the following query,
create table test_mv (a number ,b number )
alter table test_mv add constraint t_pk primary key ( a );
insert into test_mv values (1,2);
insert into test_mv values(2,2);
insert into test_mv values(3,2);
insert into test_mv values(4,2);
insert into test_mv values(5,2);
commit;
CREATE MATERIALIZED VIEW LOG ON test_mv
WITH SEQUENCE, ROWID
*(a,b)*
INCLUDING NEW VALUES;
CREATE MATERIALIZED VIEW product_sales_mv
ENABLE QUERY REWRITE
AS SELECT b from test_mv;
Now i want to update the query in the MV as 'Select a from test_mv' . for that i tried with
*'ALTER MATERIALIZED VIEW product_sales_mv AS SELECT a from test_mv;'*
But it throwing error,
Error starting at line 5 in command:
alter MATERIALIZED VIEW product_sales_mv AS SELECT b from test_mv
Error report:
SQL Error: ORA-00933: SQL command not properly ended
+00933. 00000 - "SQL command not properly ended"+
*Cause:+
*Action:+
i guess i am doing wrong. kindly help me here. i want to update it without drop and recreate.
thanks,
Jeevanand.KeHi Jeeva,
No. you cannot add or drop columns to the materialized view using the ALTER Statement.
To Change the Structure of the view , drop and re-create the materialized view.
To Alter a materialized view log, You can use the ALTER MATERIALIZED VIEW LOG. By this,
You can add new columns to a materialized view log.
ALTER MATERIALIZED VIEW LOG ON sggi_mrps.emp ADD(deptno);Thanks,
Shankar
Edited by: Shankar Viji on Aug 24, 2012 2:11 AM -
Please help with the query creating Materialized View
Hi,
We are using the below query to create a Materialized View but it has been running since 3 hours. It is an Oracle 9i database running in HP-UX.The quey is as follows,
(SELECT
/*+ use_nl(A) parallel (A,4)*/
A.ICD_CODE AS ICD_CODE,
A.ICD_DESC AS ICD_DESC,
A.PROC_GROUP as PROC_GROUP,
B.COMPL_ICD_CODE AS COMPL_ICD_CODE,
B.COMPL_GRP_TXT AS COMPL_GRP_TXT,
C.PROC_TYPE AS PROC_TYPE ,
C.I_O_IND AS I_O_IND,
C.DISC_MON AS QUARTER ,
B.PAT_KEY AS PAT_KEY ,
D.COMPL_TYPE_TXT AS COMPL_TYPE_TXT ,
C.PROV_ID AS PROV_ID ,
A.SPECIALTY AS SPECIALTY
FROM
EES_ICD_9_CODE A ,
EES_CLINICAL_COMPL_DATA B,
EES_CLINICAL_DATA C,
EES_CLINCL_COMPL_ICD D
WHERE A.ICD_CODE= B.ICD_CODE
AND B.ICD_CODE= C.ICD_CODE
AND B.COMPL_ICD_CODE=D.ICD_9_CD
AND B.PAT_KEY=C.PAT_KEY
AND B.COMPL_ICD_CODEB.ICD_CODE
AND C.PROC_TYPE 'L'
AND B.COMPL_GRP_TXT'Reoperations'
AND D.COMPL_TYPE_TXT'Intra-operative Misadventure'
AND C.DISC_MON>='2003101'
AND A.SPECIALTY='Colo-Rectal')
union
(SELECT
/*+ use_nl(A) parallel (A,4)*/
A.ICD_CODE AS ICD_CODE,
A.ICD_DESC AS ICD_DESC,
A.PROC_GROUP as PROC_GROUP,
B.COMPL_ICD_CODE AS COMPL_ICD_CODE,
B.COMPL_GRP_TXT AS COMPL_GRP_TXT,
C.PROC_TYPE AS PROC_TYPE ,
C.I_O_IND AS I_O_IND,
C.DISC_MON AS QUARTER ,
B.PAT_KEY AS PAT_KEY ,
D.COMPL_TYPE_TXT AS COMPL_TYPE_TXT ,
C.PROV_ID AS PROV_ID ,
A.SPECIALTY AS SPECIALTY
FROM
EES_ICD_9_CODE A ,
EES_CLINICAL_COMPL_DATA B,
EES_CLINICAL_DATA C,
EES_CLINCL_COMPL_ICD D
WHERE A.ICD_CODE= B.ICD_CODE
AND B.ICD_CODE= C.ICD_CODE
AND B.COMPL_ICD_CODE=D.ICD_9_CD
AND B.PAT_KEY=C.PAT_KEY
AND B.COMPL_ICD_CODEB.ICD_CODE
AND C.PROC_TYPE 'L'
--AND B.COMPL_GRP_TXT'Reoperations'
AND D.COMPL_TYPE_TXT='Intra-operative Misadventure'
AND B.PROC_DAY=C.PROC_DAY
AND C.DISC_MON>='2003101'
AND A.SPECIALTY='Colo-Rectal')
union
(SELECT
/*+ use_nl(A) parallel (A,4)*/
A.ICD_CODE AS ICD_CODE,
A.ICD_DESC AS ICD_DESC,
A.PROC_GROUP as PROC_GROUP,
B.COMPL_ICD_CODE AS COMPL_ICD_CODE,
B.COMPL_GRP_TXT AS COMPL_GRP_TXT,
C.PROC_TYPE AS PROC_TYPE ,
C.I_O_IND AS I_O_IND,
C.DISC_MON AS QUARTER ,
B.PAT_KEY AS PAT_KEY ,
D.COMPL_TYPE_TXT AS COMPL_TYPE_TXT ,
C.PROV_ID AS PROV_ID ,
A.SPECIALTY AS SPECIALTY
FROM
EES_ICD_9_CODE A ,
EES_CLINICAL_COMPL_DATA B,
EES_CLINICAL_DATA C,
EES_CLINCL_COMPL_ICD D
WHERE A.ICD_CODE= B.ICD_CODE
AND B.ICD_CODE= C.ICD_CODE
AND B.COMPL_ICD_CODE=D.ICD_9_CD
AND B.PAT_KEY=C.PAT_KEY
AND B.COMPL_ICD_CODEB.ICD_CODE
AND C.PROC_TYPE 'L'
AND B.COMPL_GRP_TXT='Reoperations'
--AND D.COMPL_TYPE_TXT='Intra-operative Misadventure'
AND B.PROC_DAY>C.PROC_DAY
AND C.DISC_MON>='2003101'
AND A.SPECIALTY='Colo-Rectal')
The explain plan is as follows,
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 46935 | 6716K| | 10648 | | | |
| 1 | SORT UNIQUE | | 46935 | 6716K| 14M| 10648 | 45,14 | P->S | QC (RAND) |
| 2 | UNION-ALL | | | | | | 45,13 | P->P | HASH |
|* 3 | HASH JOIN | | 42801 | 6102K| | 4640 | 45,13 | PCWP | |
|* 4 | TABLE ACCESS FULL | EES_CLINCL_COMPL_ICD | 875 | 18375 | | 2 | 45,02
|* 5 | HASH JOIN | | 41552 | 5072K| 14M| 4638 | 45,13 | PCWP | |
|* 6 | TABLE ACCESS FULL | EES_CLINICAL_DATA | 1430K| 40M| | 2855 | 45,03
|* 7 | HASH JOIN | | 628K| 56M| | 494 | 45,10 | P->P | HASH |
|* 8 | TABLE ACCESS FULL | EES_ICD_9_CODE | 37 | 2183 | | 1 | 45,08
|* 9 | TABLE ACCESS BY INDEX ROWID | EES_CLINICAL_COMPL_DATA | 2090K| 71M| | 49
| 10 | BITMAP CONVERSION TO ROWIDS | | | | | | |
|* 11 | BITMAP INDEX FULL SCAN | INX_COMPL_GRP | | | | | |
|* 12 | TABLE ACCESS BY INDEX ROWID | EES_CLINICAL_DATA | 1 | 33 | | 1
| 13 | NESTED LOOPS | | 1327 | 196K| | 947 | 45,13 | PCWP | |
|* 14 | HASH JOIN | | 60205 | 6996K| | 495 | 45,13 | PCWP | |
| 15 | TABLE ACCESS BY INDEX ROWID | EES_CLINCL_COMPL_ICD | 36 | 756 | |
|* 16 | INDEX RANGE SCAN | COMPL_TYPE_TXT_3 | 1 | | | 1 |
|* 17 | HASH JOIN | | 1420K| 132M| | 494 | 45,13 | PCWP | |
|* 18 | TABLE ACCESS FULL | EES_ICD_9_CODE | 37 | 2183 | | 1 | 45,11
|* 19 | TABLE ACCESS BY INDEX ROWID | EES_CLINICAL_COMPL_DATA | 4722K| 175M| | 49
| 20 | BITMAP CONVERSION TO ROWIDS| | | | | | | |
| 21 | BITMAP INDEX FULL SCAN | INX_COMPL_GRP | | | | | |
|* 22 | INDEX RANGE SCAN | EES_CLINICAL_DATA_IND1 | 1 | | | 2 | 45,13
|* 23 | HASH JOIN | | 2807 | 416K| | 4695 | 45,13 | PCWP | |
| 24 | TABLE ACCESS FULL | EES_CLINCL_COMPL_ICD | 911 | 19131 | | 2 | 45,06
|* 25 | HASH JOIN | | 2617 | 334K| 15M| 4693 | 45,13 | PCWP | |
|* 26 | TABLE ACCESS FULL | EES_CLINICAL_DATA | 1430K| 45M| | 2855 | 45,07
|* 27 | HASH JOIN | | 791K| 74M| | 305 | 45,12 | P->P | HASH |
|* 28 | TABLE ACCESS FULL | EES_ICD_9_CODE | 37 | 2183 | | 1 | 45,09
|* 29 | TABLE ACCESS BY INDEX ROWID | EES_CLINICAL_COMPL_DATA | 2632K| 97M| | 30
| 30 | BITMAP CONVERSION TO ROWIDS | | | | | | |
|* 31 | BITMAP INDEX SINGLE VALUE | INX_COMPL_GRP | | | | | |
Predicate Information (identified by operation id):
3 - access("B"."COMPL_ICD_CODE"="D"."ICD_9_CD")
4 - filter("D"."COMPL_TYPE_TXT"'Intra-operative Misadventure')
5 - access("B"."ICD_CODE"="C"."ICD_CODE" AND "B"."PAT_KEY"="C"."PAT_KEY")
6 - filter("C"."PROC_TYPE"'L' AND "C"."DISC_MON">=2003101)
7 - access("A"."ICD_CODE"="B"."ICD_CODE")
8 - filter("A"."SPECIALTY"='Colo-Rectal')
9 - filter("B"."COMPL_ICD_CODE""B"."ICD_CODE")
11 - filter("B"."COMPL_GRP_TXT"'Reoperations')
12 - filter("B"."ICD_CODE"="C"."ICD_CODE" AND "C"."PROC_TYPE"'L' AND "B"."PROC_DAY"="C"."PROC_DA
14 - access("B"."COMPL_ICD_CODE"="D"."ICD_9_CD")
16 - access("D"."COMPL_TYPE_TXT"='Intra-operative Misadventure')
17 - access("A"."ICD_CODE"="B"."ICD_CODE")
18 - filter("A"."SPECIALTY"='Colo-Rectal')
19 - filter("B"."COMPL_ICD_CODE""B"."ICD_CODE")
22 - access("B"."PAT_KEY"="C"."PAT_KEY")
23 - access("B"."COMPL_ICD_CODE"="D"."ICD_9_CD")
25 - access("B"."ICD_CODE"="C"."ICD_CODE" AND "B"."PAT_KEY"="C"."PAT_KEY")
filter("B"."PROC_DAY">"C"."PROC_DAY")
26 - filter("C"."PROC_TYPE"'L' AND "C"."DISC_MON">=2003101)
27 - access("A"."ICD_CODE"="B"."ICD_CODE")
28 - filter("A"."SPECIALTY"='Colo-Rectal')
29 - filter("B"."COMPL_ICD_CODE""B"."ICD_CODE")
31 - access("B"."COMPL_GRP_TXT"='Reoperations')
Note: cpu costing is offPlease help.Try removing the hints.
Is 47,000 a reasonable estimate of how many rows you expect in the results?
See these posts for other information that you should supply.
HOW TO: Post a SQL statement tuning request
HOW TO: Post a SQL statement tuning request - template posting
When your query takes too long
When your query takes too long ... -
Doubt Regarding Materialized View
Hello,
I am working on Oracle 10g.
We have multiple materialized Views which we Refresh in every 15 mins. My question is that can we get data from these MV's for a particular date....??When i am Executing a query ..which was mentioned in the earlier post...m getting a particular error.
My Query
select * from db_rational_status_reaffirm_mv as of timestamp sysdate-1
Error m Getting
ORA-01555: snapshot too old : rollback segment number 4 with name "_SYSSMU4$" too small
Any Solution ..? -
Query on Materialized View created on Prebuilt Table
Hi,
I am trying to explain the scenario below on Materialized View which I want to setup for our database.
I have created a materialized view on prebuilt table on target side on primary key. Now for purging history data from target side which are more than 5 years old I have executed the following steps:
1. Dropped the materialized view which was created previously on prebuilt table in target side.
2. Deleted the data from that target table which are more than 5 years old.
3. Now created the materialized view again on the prebuilt table.
Now, the problem which I am facing is that - if any changes happens in the source side during the above 3 steps on the target side those changed records were not captured even after successfully building materialized view again in the target side (i.e. after completing step-3 of above the intermediate changed records were not captured).
Can you please let me know exactly what I am doing wrong here and how can I achieve my intended result.
Regards,
KoushikSee matelink for doc id *252246.1*. The document id says: A materialized view was defined on a Table A. This table had a referential constraint defined against another table, Table B. This constraint was defined as 'ON DELETE CASCADE'. An 'ON DELETE CASCADE' constraint is not allowed on views but as the constraint was created on the table underlying the materialized view, Table A, it could be created although it would behave as a constraint on the view. The constraint existed for performance reasons, which is permitted, and was disabled when created but a general script had been run to enable all constraints. When a delete was performed on Table B the error above was reported although there was no view created on Table B.
-
Materialized View - Invalid Objects
We created materialized views to access Corporate HRMS data on our local instance using DB Links. All the materialized views become invalid very often. Not sure under which Circumstances. Our DBA mentioned that it happens when we refresh our instance. He suggested to create sysnonyms for DBLINK which points to Corporate instance. Then we should refer the synonym in our Materializd view script and not to refer the DBLINK directly in materialized view definition. He might be right but I am not sure whether his suggestion will solve our issue completely.
We are refreshing the materialized views every four hours and we do complete refresh.
Any suggestions to avoid the the above situation. Right now we recompile the materialized whenever the objects become invalid.
Thanks
InduHi,
it happens when we refresh our instanceWhat do you mean ? Is it an export/import from an other database ? Does the db link used on source exists and works on the target (where you currently experience pb) ?
Nicolas.
Maybe you are looking for
-
Purchase of macbook pro 15.
Hey. I need an advice because I'm going to buy a macbook pro 15,3 during the summer and I'd like to get good setting. So question is maybe I should wait for the new version with better setting such GeForce 860m+. I'm going to use it for everything fr
-
Hey guys. I'm working on a project that won't let me export as JPEG. Puzzled, I opened a new file with the same settings and it wouldn't let me export as JPEG. I tried to save the new project blank and with a simple layer with a color on it and no di
-
Need Help In Solving Rotation Image Problem
1 down vote favorite Hi guys , I need your help please. I have spent hours trying to solve it but not working. I have an image i am rotating when the user clicks on a button. But it is not working. I would like to see the image rotating gradually til
-
MACBOOK with 10.5.8, then 10.6.8 and today 10.7...Lion There is a major problem regarding the connection to remote speekers with Itunes 10.4 and Airport Express using LION OS X. This is a problem I never encountered before, nor with 10.5.8 or 10.6.8
-
hi experts good morning, when i execute tc mmbe it is showing dump error sometimes back it worked fine and now it is showing dump error ,,i m giving the error below plz have a look and help me..... ShrtText Syntax error in progr