I'm testing an upgrade of a database from version 8.1.7.4 <http://8.1.7.4>to version 9.2.0.4 <http://9.2.0.4> Test db LEGS Oracle version 9.2.0.4 <http://9.2.0.4> just created Prod db ARMS Oracle version 8.1.7.4 <http://8.1.7.4> Prod db AMPROD Oracle version 9.2.0.4 <http://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
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 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 8914 31.31 74.21 44894 63033 463481</span><br ><br><br>version 8i is doing this:<br><br>SELECT "ACCT_KEY","END _ISS","ACT_DATE" FROM<br> "ADMARC"."CNR" "CNR" WHERE "ACT_DATE">=TRUNC(:1-1) AND "END_ISS ">=TRUNC(:2-1) <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 1 0.00 0.00 0 0 0</span><br style="font-family: courier new ,monospace;"><span style="font-family: courier new,monospace;">Execute 1 0.01 0.00 0 0 0</span><br style="font-family: courier new ,monospace;"><span style="font-family: courier new,monospace;">Fetch 1 13.04 24.60 17226 93473 547</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 3 13.05 24.61 17226 93473 547</span><br><br><br>version 9i is doing this:<br><br >SELECT "ACCT_NBR","ACT_DATE" FROM<br> "ADMARC". "NAD" "NAD" WHERE "ACCT_NBR"=:1 AND "ACT_DATE ">=TRUNC(:2-1) <br><br>c<span style="font-family: courier new,monospace;">all   ; 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 463500 244.01 262.98 0 0 0</span><br style="font-family: courier new ,monospace;"><span style="font-family: courier new,monospace;">Fetch 463769 109.76 130.75 20767 1854059 269</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 927269 353.77 393.74 20767 1854059 269</span><br> <br> <br>9i is clearly choosing a different method, but I don't know why.<br><br>Here 's the mview creation:<br><br>CREATE MATERIALIZED VIEW barb.MV_barb_CDT<br >TABLESPACE ARMS_DATA LOGGING BUILD IMMEDIATE <br>REFRESH FORCE ON DEMAND<br>AS<br>select * FROM admarc.nad@(protected)<br>where acct_nbr in<br> ( select acct _nbr<br> from admarc .nad@(protected)<br> where act_date >= trunc(sysdate-1)<br> union select acct_key <br> from admarc.cnr @(protected)<br> where act_date >= trunc(sysdate-1)<br> and end_iss >= trunc(sysdate-1) )<br><br>I will be grateful for any ideas.<br>Thanks so much!<br>Barb<br>