Query using Materalized view in oracle 9i and 10g

Hello
There are snapshots (materialized view) used in my application. We have recently migrated from 9i to 10g release 2 database.
After migration i have observed explain plan of query which is using materialized view and i found in 9i oracle treating materalized view as table. In 10g oracle is considerting it as MVIEW only (MAT_VIEW ACCESS BY INDEX ROWID). However in 10g cost of query which is using materialized view is much higher than 9i. And execution time is also random.
Can anbody pls. expalin diff. of materalized view access in oracle 9i and 10g.
Thanks

can you post your query with explain plan for both 9i version and 10g version.
Thanks,
karthick.

Similar Messages

  • Materialize view on oracle 9i and oracle 10g

    Hi,
    My sql query using Materialized view in from cluase.
    its execution time on oralce 9i 9.0.2 is only 0.25 sec but on oracle 10g it takes 4 minutes.
    Explain plan in oracle 9i it consider MV as table but in Oracle 10g it consider it as MV.
    i m analyze all the table before executing the query although it takes time to execute it
    Please can anyone hv the idea how to decrease the execution time.
    Thanks in advance.

    This is my QUERY
    SELECT pp.hhc_code hhc_code, descp.item_id lucode, pp.ctry_code country_code,
    pp.co_code company_code, descp.hq_descp_txt description
    FROM prod_descp_en descp,
    (SELECT DISTINCT ctry_code, co_code, item_id, hhc_code
    FROM prod_perf_xref
    WHERE procs_revis_nbr <= 1493) pp
    WHERE descp.ctry_code = pp.ctry_code
    AND descp.co_code = pp.co_code
    AND descp.item_id = pp.item_id
    AND EXISTS (
    SELECT 'X'
    FROM (SELECT prod_nbr, case_seq_nbr, prod_ctry_code, prod_co_code
    FROM ord_ship_ln
    WHERE (ord_ctry_code,
    ord_co_code,
    ord_doc_nbr,
    ord_sys_srce
    ) IN (
    SELECT ord_ctry_code, ord_co_code, ord_doc_nbr,
    ord_sys_srce
    FROM oms.ord_ship_hdr hr1
    WHERE ( ( hr1.acctg_dest_ctry = '119'
    AND hr1.acctg_dest_co = '003'
    AND hr1.acctg_dest_nbr = 131
    AND hr1.acctg_dest_type = '02'
    OR ( hr1.srce_ctry_code = '119'
    AND hr1.srce_co_code = '003'
    AND hr1.srce_loc_nbr = 131
    AND hr1.srce_loc_type_code = '02'
    ))) ln1
    WHERE descp.product_nbr = ln1.prod_nbr
    AND descp.case_nbr = ln1.case_seq_nbr
    AND descp.ctry_code = ln1.prod_ctry_code
    AND descp.co_code = ln1.prod_co_code)
    ORACLE -9i
    Plan
    SELECT STATEMENT CHOOSECost: 1,528 Bytes: 138 Cardinality: 1                                              
         16 HASH JOIN Cost: 1,528 Bytes: 138 Cardinality: 1                                         
              12 HASH JOIN SEMI Cost: 1,316 Bytes: 93 Cardinality: 1                                    
                   1 TABLE ACCESS FULL OMS.PROD_DESCP_EN Cost: 10 Bytes: 1,160,406 Cardinality: 20,358                               
                   11 VIEW SYS.VW_SQ_1 Cost: 1,290 Bytes: 515,484 Cardinality: 14,319                               
                        10 NESTED LOOPS Cost: 1,290 Bytes: 1,317,348 Cardinality: 14,319                          
                             8 TABLE ACCESS BY INDEX ROWID OMS.ORD_SHIP_HDR Cost: 138 Bytes: 31,104 Cardinality: 576                     
                                  7 BITMAP CONVERSION TO ROWIDS                
                                       6 BITMAP OR           
                                            3 BITMAP CONVERSION FROM ROWIDS      
                                                 2 INDEX RANGE SCAN NON-UNIQUE OMS.ORD_SHIP_HDR_DEST_IDX1 Cost: 1
                                            5 BITMAP CONVERSION FROM ROWIDS      
                                                 4 INDEX RANGE SCAN NON-UNIQUE OMS.ORD_SHIP_HDR_SRCE_INDX Cost: 1
                             9 INDEX RANGE SCAN UNIQUE OMS.PKORD_SHIPLN1 Cost: 2 Bytes: 950 Cardinality: 25                     
              15 VIEW OMS. Cost: 211 Bytes: 598,860 Cardinality: 13,308                                    
                   14 SORT UNIQUE Cost: 211 Bytes: 532,320 Cardinality: 13,308                               
                        13 TABLE ACCESS FULL MFIDATA.PROD_PERF_XREF_T Cost: 164 Bytes: 532,320 Cardinality: 13,308                          
    ORACLE -10g
    Plan
    SELECT STATEMENT CHOOSECost: 7,538 Bytes: 138 Cardinality: 1                                              
         19 HASH JOIN Cost: 7,538 Bytes: 138 Cardinality: 1                                         
              12 HASH JOIN SEMI Cost: 6,851 Bytes: 93 Cardinality: 1                                    
                   1 MAT_VIEW ACCESS FULL MAT_VIEW OMS.PROD_DESCP_EN Cost: 32 Bytes: 1,132,305 Cardinality: 19,865                               
                   11 VIEW VIEW SYS.VW_SQ_1 Cost: 6,612 Bytes: 2,585,376 Cardinality: 71,816                               
                        10 NESTED LOOPS Cost: 6,612 Bytes: 6,607,072 Cardinality: 71,816                          
                             8 TABLE ACCESS BY INDEX ROWID TABLE OMS.ORD_SHIP_HDR Cost: 805 Bytes: 156,114 Cardinality: 2,891                     
                                  7 BITMAP CONVERSION TO ROWIDS                
                                       6 BITMAP OR           
                                            3 BITMAP CONVERSION FROM ROWIDS      
                                                 2 INDEX RANGE SCAN INDEX OMS.ORD_SHIP_HDR_SRCE_INDX Cost: 6
                                            5 BITMAP CONVERSION FROM ROWIDS      
                                                 4 INDEX RANGE SCAN INDEX OMS.ORD_SHIP_HDR_DEST_IDX1 Cost: 1
                             9 INDEX RANGE SCAN INDEX (UNIQUE) OMS.PKORD_SHIPLN1 Cost: 2 Bytes: 950 Cardinality: 25                     
              18 VIEW OMS. Cost: 685 Bytes: 1,154,925 Cardinality: 25,665                                    
                   17 HASH UNIQUE Cost: 685 Bytes: 1,026,600 Cardinality: 25,665                               
                        16 VIEW VIEW MFIDATA.index$_join$_007 Cost: 511 Bytes: 1,026,600 Cardinality: 25,665                          
                             15 HASH JOIN                     
                                  13 INDEX RANGE SCAN INDEX MFIDATA.IDX_PROD_PERF_XREF_ROW_DELT Cost: 419 Bytes: 1,026,600 Cardinality: 25,665                
                                  14 INDEX FAST FULL SCAN INDEX (UNIQUE) MFIDATA.IND_PROD_PERF_XREF_INDEX1 Cost: 309 Bytes: 1,026,600 Cardinality: 25,665

  • Oracle 9i and 10g in one computer

    Could I install oracle 10g in computer where 9i is instaled. I want that both oracle is instal and test oracle 9i and 10g. Could I run oracle database 9i and 10g together and I use both of the database?
    Thanks for answer.
    Rafal Dmitrowski

    I would also suggest caution if you have a Windows server. While it is certainly possible to have both running, there are some issues with separate 9i and 10g homes on a Windows machine, things like the Oracle Home Selector doesn't work with 10g Oracle Homes. I wouldn't be overly concerned if you are dealing with development laptops, but I would make sure to do some testing before installing 10g on a production server with 9i already installed.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Data Replication between Oracle 9i and 10g

    Hello,
    I have a question regarding possible Replication Models between Oracle 9i and 10g. Does anybody know a possible way to syncronize the schema data between a 9i and 10g database in realtime?
    If yes can you please post perhaps a link with a kind of how to?
    Many thanks to all,
    Bob...

    You can read this metalink note 370850.1 - there are bit more ways of replication discussed.
    Yes, platforms can be different, but recomendation is to use the same platform for both databases.

  • Oracle 9i and 10g differences in "group by"

    I found the sorting order is different in "group by" function of Oracle 9i and 10g.
    What is the reason?
    >>>>>>>>>>>>>>>>>>>>>
    SQL> create table t ( a number, b number);
    Table created.
    SQL> insert into t values (1,2);
    1 row created.
    SQL> insert into t values (100, 200);
    1 row created.
    SQL> insert into t values (10, 20);
    1 row created.
    >>>>>>>>>
    9i
    >>>>>>>>>
    SQL> select sum (b) , a from t group by a;
    SUM(B) A
    2 1
    20 10
    200 100
    >>>>>>>>>
    10g
    >>>>>>>>>
    SQL> select sum (b) , a from t group by a;
    SUM(B) A
    2 1
    200 100
    20 10

    in oracle "group by" doesn't sort. Not strictly true.
    Pre 10g had an implicit order by which was caused by the way the database engine performed it's group by operation.
    In 10g this has now been "refined" so that group by does what it says i.e. groups the data, without having the side effect of implicitly ordering the data.
    In reality if you want data in a particular order you should always specify an ORDER BY clause and never rely on the fact that Oracle used to suffer from an implicit side effect.
    ;)

  • At least 6 differences between Oracle 9i and 10g with complete understan

    Hi 2.     
    At least 6 differences between Oracle 9i and 10g                    with complete understanding of each difference .
    cheers

    Hi,
    Forum thread already opened by you
    check what is the major difference between 9i and 10g
    regards,
    kaushal

  • Difference Between Oracle 9i and 10G (Urjent)

    Hi..
    Iam intensively searching net for some whitepapers regarding the difference between Oracle 9i and 10g. I need to give demo to the client on this. So Plzzzz help me in this regard and send me the links if u know....
    thnx in advance
    Sriram

    Hello,
    Go to this link. It is compete and most well defined new features of 10g.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14214/toc.htm
    http://www.oracle.com/technology/documentation/index.html
    In second link you will find all the versions of database.

  • How SMON coalesces free space in oracle 9i and 10g

    how SMON coalesces free space in oracle 9i and 10g?
    Is it doing same as it was behaving in oracle 7 like looking through free extent table every five minutes (sys.fet$) to see if there are any adjacent free extents that can be coalesced into a single extent, and on every 25th cycle (i.e. every two hours and five minutes) it looks at the segment table (sys.seg$) to see if there are any temporary segments that need to be eliminated, as explained by jonathan lewis?
    what are extent and segment tables available in oracle 9i and 10g like sys.fet$ and sys.seg$ in oracle7?

    >
    how SMON coalesces free space in oracle 9i and 10g?
    Is it doing same as it was behaving in oracle 7 like looking through free extent table every five minutes (sys.fet$) to see if there are any
    adjacent free extents that can be coalesced into a single extent, and on every 25th cycle (i.e. every two hours and five minutes) it looks
    at the segment table (sys.seg$) to see if there are any temporary segments that need to be eliminated, as explained by jonathan lewis?
    what are extent and segment tables available in oracle 9i and 10g like sys.fet$ and sys.seg$ in oracle7?I think you need to go and have a look at the Oracle 9i documentation here
    http://www.oracle.com/technology/documentation/oracle9i_arch_901.html
    and automatic segment management in 10g
    http://www.oracle.com/technology/pub/articles/10gdba/week15_10gdba.html
    HTH.
    Paul...
    Software - OS (+ version), Server,
    Hardware - CPU + Disk configuration.
    Please include all of the above information with database queries.
    This will help those who are trying to help you!
    Furthermore, please do not top-post and do try to trim your replies!

  • Issue with .profile for oracle 9i and 10g

    Here I have six oracle 9i databases on one box. I am going to upgrade five of them to oracle 10g and want to keep one database RCAT in oracle 9i for one or two week.
    So, when I do upgrade I have to setup oracle home for 10g and also profile for oracle user for 10g (correct me if I m wrong). But now I want one database RCAT on oracle 9i. How can I take care of this.
    I mean how I will handle profile and all other thing for oracle 9i and 10g at the same time.
    Thanks,
    Vishal

    Install 10g under the same OS user as 9i, of course on a different Oracle Home. Then you configure your .profile consequently. Just as an example, this is my .bash_profile with 10g and 11g with the same oracle OS user :
    [oracle@linux5 ~]$ cat .bash_profile
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    export EDITOR=vi
    export ORACLE_BASE=/home/oracle/base
    umask 022
    o10()
    {       export ORACLE_SID=db102
            export ORACLE_HOME=$ORACLE_BASE/OraHome10
            export LD_LIBRARY_PATH=$ORACLE_HOME/lib
            export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
            export TNS_ADMIN=$ORACLE_BASE/OraHome11/network/admin
            export PS1='[\u@\h_10 \W]\$ '
    o11()
    {       export ORACLE_SID=db11
            export ORACLE_HOME=$ORACLE_BASE/OraHome11
            export LD_LIBRARY_PATH=$ORACLE_HOME/lib
            export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
            export PS1='[\u@\h_11 \W]\$ '
    s()
    {       sqlplus / as sysdba
    asm()
    {       export ORACLE_SID=+ASM
    db10()
    {       export ORACLE_SID=db102
    db11()
    {       export ORACLE_SID=db11
    asm10()
    {       export ORACLE_SID=asm10
    [oracle@linux5 ~]$

  • Can we locate oracle 9i and 10g databases in same PC

    hi all
    wish U happy new year...
    I have installed oracle 9i and 10g database ..but 10g database is not working it says TNS protocol adapter error or invalied username password...I stpeed the 9i services and listner in the 9i home...but 10g database is not working.9i and 10g databases are in two different partitions....
    I want to know is it possible to running 9i and 190g database in same PC...if it's possible pls can you give me a solution for my problem
    regards
    Buddhike

    when I was trying to up the database it is looking for another listener
    and massage coming listener is not running...Not clear. The database does not look for a listener, maybe you got that error when trying to connect ?
    Do you have a listener 10g service ? Did you start it ? If not, please try the following :
    C:\> set ORACLE_HOME=<Your 10g Home>
    C:\> set PATH=%ORACLE_HOME%\bin;%PATH%
    C:\> lsnrctl start
    wait up to a minute, then execute
    C:\> lsnrctl status
    and post the result.

  • Oracle 9i and 10G professionals required

    Hi All,
    A company in Tanzania is looking for Oracle 9i and 10G professionals for immediate requirement. Those who are looking for change and has 4 to 5 years experience can send in your resumes to [email protected] Indians are preffered. Mention "ORJOB#040820081411" in the subject.
    Kindly send in your resume as early as possible.
    Thank you.

    You can try setting the SGA to a low value and bring up both the databases. I don't think it should be too slow provided you are not running other windows programs.
    If you are really interested in trying out new products you can also explore the option of installing VMware, creating virtual machines & installing Linux, and then playing with the different Oracle products. Doing this will at least keep your main windows operating system clean.
    You may want to check out my blog post on Build your own oracle test lab
    Cheers !!!
    Ashish Agarwal
    http://www.asagarwal.com

  • Urgent: Regarding Join Syntax in Oracle 9i and 10g

    Dear Members
    Please help me by providing me the synatx of following Join statements for Oracle 9i and 10g:
    1.Inner Join
    2.Left Outer Join
    3.Right Outer Join
    4.Self Join
    5.Cross Join
    6.Full Outer Join
    N.B. I NEED THIS HELP URGENTLY
    Regards
    Praveen Kumar Pandey

    Inner join
    SELECT *
      FROM a,
           b
    WHERE a.<<column>> = b.<<column>>Left Outer Join
    SELECT *
      FROM a LEFT OUTER JOIN b
             ON a.<<column>> = b.<<column>>Right Outer Join
    SELECT *
      FROM a RIGHT OUTER JOIN b
             ON a.<<column>> = b.<<column>>Full Outer Join
    SELECT *
      FROM a FULL OUTER JOIN b
             ON a.<<column>> = b.<<column>>Self Join
    SELECT *
      FROM a a1,
           a a2
    WHERE a1.<<column>> = a2.<<column>>Cartesian Join
    SELECT *
      FROM a,
           bJustin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • What is major difference between oracle 9i and 10g

    hi ,
    I hv read some documentation of oracle 9i and 10g ,but i dont understand what is major difference between oracle 9i and 10g .

    Its not the difference, but its the additional feaures.
    There are many more feature in every aspect of database. which area are you specifically looking for..
    I would reccomned a following doc on OTN
    Oracle® Database New Features Guide 10g Release 2 (10.2)

  • What is difference between oracle 9i and 10g?

    Hi All,
    please explain difference between oracle 9i and 10g with example.
    your suggestion would be greatly appreciated.

    user13842301 wrote:
    Hi All,
    please explain difference between oracle 9i and 10g with example.
    your suggestion would be greatly appreciated.One letter and one number :)
    But seriously, they document this stuff (way too much to write in a forum reply).
    For 10.1
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10750/toc.htm
    and for the more popular 10.2
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14214/toc.htm

  • Diffrence between oracle 9i and 10g

    i want to know what is the main difference between oracle 9i and 10g?

    nmohapatra87 wrote:
    i want to know what is the main difference between oracle 9i and 10g?You will get top new features in 10g as compared to 9i below
    http://www.oracle-base.com/articles/10g/articles-10g.php
    http://docs.oracle.com/cd/B19306_01/server.102/b14214/chapter1.htm
    http://www.oracle.com/technetwork/articles/sql/index-082320.html

Maybe you are looking for

  • Macbook Pro cannot connect iPhone 3Gs

    I'm in Turkey and my carrier supports internet tethering. I tried to connect my iPhone to my MBP via bluetooth. Pairing is successful but when i click "connect" on my MBP, nothing happens. Or I tap my Macbook's name on my iPhone there was this messag

  • S-Video & Cinema Display on MBP

    I've posted this originally in the macBook Pro section but quickly realized that this is as much a FCP question as it is a macbook Pro question. Here's the link to the original post: http://discussions.apple.com/thread.jspa?threadID=350386 I hadn't r

  • How to convert concurrent program out files .out file to .txt files in

    Hi Trying to know if there is a way to convert the concurrent programs' output files witn '.out' extension to files with extension '.txt' thanks kp

  • Fail to find the file include

    I am building a game and I just simply use a txt file to store the level reached. Everything goes smooth but today I find something wrong. I have included a levelrecord.txt in the included files section in iphone iOS setting. But I find that after th

  • How to recovery Itunes in my pc

    Updated Itunes latest and after stop it dissapear from my browser. Trying to sync and nothing is there. What Can I do to recovery my account and sync my Ipad with all I have??please help