I can't tell you the specific action to take to fix the process, but it's root cause is probably because of the different default values in 9i vs. 8i for many underscore parameters related to the optimizer. These particularly affect subqueries. Take a look in Metalink for terms like "unnest".
--Terry I'm testing an upgrade of a database from version 8.1.7.4 to version 9.2.0.4 Test db LEGS Oracle version 9.2.0.4 just created Prod db ARMS Oracle version 8.1.7.4 Prod db AMPROD Oracle version 9.2.0.4
Test (LEGS) is creating a materialized view via a link from the AMPROD database. This mview is created in less than 2 minutes when run from the prod ARMS 8i database. The same mview takes 40 minutes in the newly-upgraded test LEGS 9i database. IDENTICAL MVIEW; only difference is running out of 8i database versus 9i database.
All 3 databases are on the same VMS node. (OpenVMS 7.3-1)
Google/Metalink searches like "materialized view slow upgrade" yielded no useful info.
The mview from the 8i database is gathering the data in a different manner. For example, v8i:
SELECT "ACCT_NBR", . . . more stuff FROM "ADMARC"."NAD" "NAD" WHERE "ACCT_NBR"=:1
9i is clearly choosing a different method, but I don't know why.
Here's the mview creation:
CREATE MATERIALIZED VIEW barb.MV_barb_CDT TABLESPACE ARMS_DATA LOGGING BUILD IMMEDIATE REFRESH FORCE ON DEMAND AS select * FROM admarc.nad@(protected) where acct_nbr in ( select acct_nbr from admarc.nad@(protected) where act_date >= trunc(sysdate-1) union select acct_key from admarc.cnr@(protected) where act_date >= trunc(sysdate-1) and end_iss >= trunc(sysdate-1) )
I will be grateful for any ideas. Thanks so much! Barb
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1498" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Barbara,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I can't tell you the specific action to take to fix the process, but it's root cause is probably because of the different default values in 9i vs. 8i for many underscore parameters related to the optimizer. These particularly affect subqueries. Take a look in Metalink for terms like "unnest".</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>--Terry</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">I'm testing an upgrade of a database from version <A href="http://8.1.7.4">8.1.7.4</A> to version <A href="http://9.2.0.4">9.2.0.4</A><BR> Test db LEGS  ; Oracle version <A href="http://9.2.0.4">9.2.0.4</A> just created <BR>   ;Prod db ARMS Oracle version <A href="http://8.1.7.4">8.1.7.4</A><BR> Prod db AMPROD Oracle version <A href="http://9.2.0.4">9.2.0.4</A><BR><BR>Test (LEGS) is creating a materialized view via a link from the AMPROD database. <BR>This mview is created in less than 2 minutes when run from the prod ARMS 8i database. <BR>The same mview takes 40 minutes in the newly-upgraded test LEGS 9i database. <BR>IDENTICAL MVIEW; only difference is running out of 8i database versus 9i database.<BR><BR>All 3 databases are on the same VMS node. (OpenVMS 7.3-1)<BR><BR>Google/Metalink searches like "materialized view slow upgrade" yielded no useful info. <BR><BR>The mview from the 8i database is gathering the data in a different manner. <BR>For example, v8i:<BR><BR><SPAN style="FONT-FAMILY: courier new,monospace">SELECT "ACCT_NBR", . . . more stuff</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">FROM "ADMARC"."NAD" "NAD" WHERE "ACCT_NBR"=:1</SPAN><BR style="FONT-FAMILY: courier new,monospace"><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">call count cpu elapsed disk query rows</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">-- ---- -- --- -- ----- -- ---- -- -- ---- -- -- ---- -- -- ---- --</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">Parse   ; 1 0.00 0.00 0 0 0</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">Execute 516 0.30 0.26 0 0 0</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">Fetch   ; 516 0.18 0.65 73 2066 516</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">-- ---- -- --- -- ----- -- ---- -- -- ---- -- -- ---- -- -- ---- --</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">total 1033 0.48 0.92 73 2066 516</SPAN><BR><BR><BR>v9i : (I don't know what that sys_alias_1 thing is)<BR><BR>S<SPAN style="FONT-FAMILY: courier new,monospace">ELECT "ACCT_NBR, . . . more stuff</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">FROM "ADMARC"."NAD" "SYS_ALIAS_1"</SPAN><BR><BR><SPAN style="FONT-FAMILY: courier new,monospace">call count cpu elapsed disk query rows< /SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">-- ---- -- --- -- ----- -- ---- -- -- ---- -- -- ---- -- -- ---</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">Parse   ; 0 0.00 0.00 0 0 0</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">Execute 0 0.00 0.00 0 0 0</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">Fetch 8914 31.31 74.21 44894 63033 463481</SPAN><BR