Query ON ORACLE AND OAS UPGRADE PLAN

Currently we are running Oracle Server 7.3.4 Under Unix (SunOS5.7) with access to a Sybase 12.5.0.1 via Oracle-Sybase Transparent Gateway 4.1.1.0.0.
For the web services, we use OAS 4.0.8.1. Our web applications are based on Javascript and Oracle PL/SQL to generate HTML.
We plan to upgrade the Oracle Server from 7.3.4 to Oracle 9iAS version 9.2.0.1.
Our quetions are :
1) Is it necessary to upgrade OAS 4.0.8.1 to Oracle 9iAS?
1a)If we have to upgrade then which version of 9iAS (9.0.2, 9.0.3, 9.0.4)is compatible?
1b)what change, if any, do we have to make to our exisiting applications(Javascript, HTML and PL/SQL-generated HTML) (we understand that the application logic would not have to be change in any
way. Is this so?)
2) Are Oracle Server 9i and Oracle 9iAS Application Server compatible with the SunOS5.7 Unix or is an upgrade to a later version necessary?
3) Do we need to upgrade the Oracle-Sybase Transparent Gateway if we upgrade the Oracle Server to Oracle9i and if so, to what version?
Please confirm that Oracle9.2 has a Gateway to Sybase 12.5.0.1 that will support the features of 7.3.4 gateway (i.e it is downward compatible to 7.3.4
gateway).

Not real sure if this is doable or would help, but perhaps you can load the access table into an Oracle Global Temporary Table? See http://www.oracle-base.com/articles/8i/TemporaryTables.php (and google on it). I think I'm assuming your 11 hour query had something to do with shovelling a bucketload of data to the access side, perhaps if you could show us the plan on the Oracle side that access was generating to get the Oracle data there might be a different answer.
Oftentimes cross-db tools won't use Oracle features like analytics, or do slow-by-slow row processing where a short procedure could do things within the Oracle sql engine and return data in larger arrays.
Sometimes mass data cleansings benefit from using server side tools outside of the db. Do you have the data from before it was loaded to Oracle? What Oracle platform are you on?

Similar Messages

  • Problem with different resultset with same data and same query in Oracle 8.1.7 and 9i

    Hello,
    I have been using this query in oracle 8.1.7
    SELECT
    ID,
    AREA_NO
    FROM MANAGER_AREA MGR
    WHERE COMPANY_ID = :id AND
    (:value < (SELECT COUNT(ROWID)
    FROM MANAGER_WORK MW
    WHERE MW.AREA_ID = MGR.ID AND
    (MW.END_WORK IS NULL OR MW.END_WORK >= SYSDATE)))
    order by AREA_NO;
    In the above query I want to see rows from MANAGER_AREA table depending upon date criteria in the table MANAGER_WORK and also upon the parameter :value i.e if I pass a value as 0 I get to see records for which their is atleast 1 record in MANAGER_WORK with the date criteria and if I pass -1 then I get all the records because minimum value that count(*) would give is 0. The resultset was as expected in 8.1.7.
    A couple of days back I installed PERSONAL 9i to test for testing the basic functionality of our program with the same data. This query fails and irrespective whether I pass -1 or 0 it returns me same dataset which I would have got in case if I pass 0.
    I do not know whether this is a bug that has got introduced in 9i. Can anybody help me with this problem. It would be difficult for me to change the parameter send to this query as the Query is called from many different places.
    Thanks in advance
    Amol.

    I cannot use a Group by and a having statement over here. The problem with 'Group by' and 'having' clause is If I have to make a join between the two tables. When I use join then I get only rows that are linked to each other in the table.
    If I use outer join to solve that problem then I have to take in consideration the other date condition. My previous query use to virtually discard the corelated query result by using -1 as the value. This will not happen in the join query.
    Amol.

  • BW Upgrade Plan  3.1C  To BI 7.0 (Procedure and Checklist)

    Hi Friends,
    Pls send the template for BW Upgrade Plan 3.1C  To BI 7.0 (Procedure and Checklist)/Document. I need the exact & accurate SAP Standard Template/document. I searched SAPHelp 
    /https://websmp110.sap-ag.de/instguides . could n't find any thing for this.Pls send it to 
    :[email protected]
    ***PS: Only accurate replies will get full points**
    Regards
    CSM Reddy

    Reddy,
    please chck out
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2e8e5288-0b01-0010-2ea8-bcd4df5084a7
    a hwo to on BI7.0 upgrade .. also as suggested check out the BW upgrade roadmap on the support portal..
    Hope it helps..
    Arun
    Assign points if helpful

  • I bought years ago CS6 - Design Standard and an expensive MLP New Upgrade Plan in order to upgrade the software after. Can I upgrade to CC, or I simply lost my money?

    I bought a license to use Creative Suite 6 - Design Standart almost two years ago. In the same ocasion, I bought a MLP New Upgrade Plan, wich were very expensive, but gave me the wright to upgrade my CS6-Design Standart for new versions within two years. I thoght I made good business, buying an Upgrade Plan that allowed me to have further versions of my software for two years without adicional purchase. What happens is that I can't find a way to upgrade my CS6-Design Standard Suite to a CC Suite. Did I simply threw my money away purchasing the MLP New Upgrade Plan, wich never alowwed me to do any upgrade, or is there a way, fairly, to use my Upgrade Plan that is almost expiring to have access to Creative Cloud?

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • I am currently an iPhone user, and I am planning to upgrade to a galaxy s5. Will I still be able to group message with iPhone users even thought I have a galaxy

    I am currently an iPhone user, and I am planning to upgrade to a galaxy s5. Will I still be able to group message with iPhone users even thought I have a galaxy

    Hi
    Yes you should be able too, this depends on the features on the phone but i would imagine something as new as the s5 would have this feature. However this would obviously be over standard sms rather than imessage.
    Hope this helps

  • How can i get some help to cancel my single app month to month and/or upgrade to full creative cloud membership? please don't tell me to follow the guidelines because i've tried several times but the options to 'switch plan' or cancel plan' are not availa

    how can i get some help to cancel my single app month to month and/or upgrade to full creative cloud membership? please don't tell me to follow the guidelines because i've tried several times but the options to 'switch plan' or cancel plan' are not available on my screen

    Keensy I have requested a member of our support team contact you directly via telephone.  Once I was able to review the correct account it appears our support team has tried multiple times to contact you.  I would recommend checking your SPAM filtering in case you need to receive additional messages from our support team.
    I did request that you be contacted via telephone. I am sorry for all of the difficulties which you have faced.
    For future viewers of this discussion when contacting our support team at Contact Customer Care it is imperative that you be logged in under the account tied to your membership/subscription.  While there is cancelation options available you will have an increased chance of being offered an opportunity to contact our support team if your account entitlement can be verified.  For this to be done you will need to be signed into the same account as your membership/subscription/registered software title.

  • I have creative suite version 5.5 Isn't there a way to just upgrade the software without using the cloud and a monthly plan?

    I have creative suite version 5.5 Isn't there a way to just upgrade the software without using the cloud and a monthly plan?

    Only to the 3+ year old Creative Suite 6

  • Oracle Retail Merchandise Financial Planning and RPAS

    Hi, i'm new with Oracle Retail and ORACLE RPAS. I would like ton know the best way to backup RPAS or if RPAS support Real Application Cluster or something like that.
    We will install Oracle Retail Merchandise Financial Planning component and i would like the best architecture to do it.
    Regards

    Question:
    What makes up the added value in OR MerchandiseAnalytics over ORDW?
    Both offer extraction layer, staging layer, datamart layer, aggregate layer, OBIEE + prebuilt reports.
    I want to know how the fact extraction layer on ORMS etc. is done using ODI. Unfortunately I see no CDC/Streams approach, that we have chosen to use for our extensions to the ORDW datamodel. Is the extraction logic more or less a rebuild of the good old Pro*C DWI programs?
    Some points:
    - More products have been connected to ORMA, additional to RMS: ReIM, ReSA, ORMFP, ORPM.
    - ORMA has had an technology update for the ETL, from OR-only's custom RETL to the more general Oracle ODI (formerly Sunopsis).
    - Is it the promised/future integration of one set of conformed dimension reused and shared over all other to-be OR analytics products? (Like Marketing, Planning, Supply Chain, Stores).
    - ORMA offers 'Dashboards' - may be straightforward to make in RDW-OBIEE?
    - ORMA offers multiple timeviews, where base RDW only offers AsWas (SCD2) - bsiness users may appreciate the AsIs view, and PIT.
    Cherio,
    Erik
    Edited by: ErikYkema on May 25, 2011 10:38 PM
    According to the RMS13.2 release notes (http://download.oracle.com/docs/cd/E12448_01/rms/pdf/rms_rfm_br/132/rms-132-rn.pdf), RETL and all RETL based interfaces to ORDW are desupported from 13.2!
    “Discontinued Support for Oracle Retail Data Warehouse (RDW) Interfaces
    A new analytical application is in development. Because of this strategic decision, support for interface between Oracle Retail applications and Oracle Retail Data Warehouse has been discontinued for Oracle Retail 13.2 releases. Oracle Retail Extract, Transform, and Load (RETL) extract scripts for RDW are not supported for use with Oracle Retail 13.2 applications and databases.”
    That makes things a lot clearer!

  • How to find out the date when an oracle database is upgraded

    Hi,
    I would like to know the date when an oracle database is upgraded (for example 10.2.0.4 to 11.2.0.3).
    Can you help me to find out these details.
    Thanks,
    Sarayu

    user13312943 wrote:
    Hi Ed and SB,
    Thanks for your replies. How about this option?
    Let us assume I am interested in checking when my database is upgraded to any 11g version.
    Will this query help?
    select min(first_usage_date)  from  dba_feature_usage_statistics where  version like '11%';
    I understand this may not be a generic solution , but with this idea I may be able to build up a query to get the result.
    Thanks,
    Sarayu
    How is it that you or nobody knows when the DB was upgraded?
    I would have expected a formal testing & upgrade plan.
    Does the organization practice safe software & utilize any source code repository?
    Does everyone suffer from amnesia?
    How could a MAJOR database upgrade slip by everyone who should care about such a detail?

  • Same Query returning different result (Different execution plan)

    Hi all,
    To day i have discovered a strange thing: a query that return a different result when using a different execution plan.
    The query :
    SELECT  *
      FROM schema.table@database a
    WHERE     column1 IN ('3')
           AND column2 = '101'
           AND EXISTS
                  (SELECT null
                     FROM schema.table2 c
                    WHERE a.column3 = SUBSTR (c.column1, 2, 12));where schema.table@database is a remote table.
    when executed with the hint /*+ ordered use_nl(a c) */ these query return no result and its execution plan is :
    Rows     Row Source Operation
          0  NESTED LOOPS  (cr=31 r=0 w=0 time=4894659 us)
       4323   SORT UNIQUE (cr=31 r=0 w=0 time=50835 us)
       4336    TABLE ACCESS FULL TABLE2 (cr=31 r=0 w=0 time=7607 us)
          0   REMOTE  (cr=0 r=0 w=0 time=130536 us)When i changed the execution plan with the hint /*+ use_hash(c a) */
    Rows     Row Source Operation
       3702  HASH JOIN SEMI (cr=35 r=0 w=0 time=497839 us)
      22556   REMOTE  (cr=0 r=0 w=0 time=401176 us)
       4336   TABLE ACCESS FULL TABLE2 (cr=35 r=0 w=0 time=7709 us)It seem that when the execution plan have changed the remote query return no result.
    It'is a bug or i have missed somthing ?
    PS: The two table are no subject to insert or update statement.
    Oracle version : 9.2.0.2.0
    System version : HP-UX v1
    Thanks.

    H.Mahmoud wrote:
    Oracle version : 9.2.0.2.0
    System version : HP-UX v1Hard to say. You're using a very old and deprecated version of the database, and one that was known to contain bugs.
    9.2.0.7 was really the lowest version of 9i that was considered to be 'stable', but even so, it's old and lacking in many ways.
    Consider upgrading to the latest database version at your earliest opportunity. (or at least apply patches up to the latest 9i version before querying if there is bugs in your really low buggy version)

  • SQL Query takes 7 hours after upgrade to 10g

    the following query executes in under a minute in 9i, however once upgraded to 10g it takes 7 hours. The query is designed to select the data row with the max date value for the selected criteria (there are multiple rows that match the below criteria with different dates)
    I have tested in a lower environment the setting of "_optimizer_cost_based_transformation"=off and this corrects the problem. I do not feel comfortable setting this parameter session or system wide to provide a solution
    We are running Oracle 10gR2 on Solaris
    select "INSTN_ID_N",
    "MEAS_D",
    "FEED_TYPE_C",
    "FREQ_C",
    "STAT_LVL_C",
    "TS_D",
    "IX_INSTN_ID_C",
    "ENTI_TYPE_C",
    "CNTXT_ID_C",
    "CNTXT_C",
    "IX_CNTXT_ID_C",
    "VND_C",
    "PRCS_C",
    "USR_ID_C",
    "STAT_C",
    "OVRD_RSN_C",
    "LD_DT_D",
    "UPD_USR_C",
    "UPD_TS_D",
    "INS_USR_C",
    "INS_TS_D",
    "DEL_FLG_C"
    from IDA.V_INSTANCE_STATUS M
    where
    TS_D =
    select max (TS_D) from IDA.V_INSTANCE_STATUS
    where
    INSTN_ID_N = M.INSTN_ID_N AND
    MEAS_D = M.MEAS_D AND
    FEED_TYPE_C = M.FEED_TYPE_C AND
    FREQ_C = M.FREQ_C AND
    STAT_LVL_C = M.STAT_LVL_C AND
    IX_INSTN_ID_C = M.IX_INSTN_ID_C
    )

    user638113 wrote:
    the following query executes in under a minute in 9i, however once upgraded to 10g it takes 7 hours. The query is designed to select the data row with the max date value for the selected criteria (there are multiple rows that match the below criteria with different dates)
    I have tested in a lower environment the setting of "_optimizer_cost_based_transformation"=off and this corrects the problem. I do not feel comfortable setting this parameter session or system wide to provide a solutionIf you're sure that the "lower" environment reproduces the same issue, and not due to some other differences (different statistics, parameters etc.), then you could share the two different execution plans generated via DBMS_XPLAN.DISPLAY having the cost based transformations turned on and off. Make sure you use the \ tags before and after the plan output to format it in fixed font. You can use the "Quote" button in the message editor to see how to use the tag.
    Furthermore a optimizer trace (10053) might reveal why the cost based transformations lead to such an result.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Fast query in Oracle 10 but slow in Oracle 11

    Hello all,
    We have a query that is running smooth in Oracle 10g. It takes less then a second. We have setup a second server and used export/import to create the same database on 11g. On this 11g database the query takes a lot of time (like 8s or more).
    Below are the details. Maybe somebody can point us to the reason why this happens.
    We are talking about this statement :
    Select nvl(sum(BM_OPENST_D - BM_OPENST_CR),0)
    from bh.bh123gh
    where
    F123_AR_NR>='4400000000' and
    F123_AR_NR<='4404000000' and
    F123_KL_LEV_AR_NR='0631001000' and
    SRT_REK=2 and
    F123_BKJR>=0000 and
    F123_BKJR<=2011 and
    F123_FIRMA=2;Database version is 11.2.0.1.0
    SQL>
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      11.2.0.1
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    optimizer_use_invisible_indexes      boolean     FALSE
    optimizer_use_pending_statistics     boolean     FALSE
    optimizer_use_sql_plan_baselines     boolean     TRUE
    SQL>
    SQL> show parameter db_file_multi
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     6
    SQL>
    SQL> show parameter db_block_size
    NAME                                 TYPE        VALUE
    db_block_size                        integer     8192
    SQL>
    SQL> show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                       string      EXACT
    SQL>
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>
    SQL> select         sname
      2              , pname
      3              , pval1
      4              , pval2
      5  from
      6              sys.aux_stats$;
    SNAME                PNAME                     PVAL1 PVAL2
    SYSSTATS_INFO        STATUS                          COMPLETED
    SYSSTATS_INFO        DSTART                          03-30-2010 11:05
    SYSSTATS_INFO        DSTOP                           03-30-2010 11:05
    SYSSTATS_INFO        FLAGS                         1
    SYSSTATS_MAIN        CPUSPEEDNW           1183.90219
    SYSSTATS_MAIN        IOSEEKTIM                    10
    SYSSTATS_MAIN        IOTFRSPEED                 4096
    SYSSTATS_MAIN        SREADTIM
    SYSSTATS_MAIN        MREADTIM
    SYSSTATS_MAIN        CPUSPEED
    SYSSTATS_MAIN        MBRC
    SYSSTATS_MAIN        MAXTHR
    SYSSTATS_MAIN        SLAVETHR
    13 rows selected.
    Elapsed: 00:00:00.03
    SQL>
    SQL> explain plan for
      2  Select nvl(sum(BM_OPENST_DEB - BM_OPENST_CR),0)
      3  from bh.bh123gh
      4  where
      5  F123_AR_NR>='4400000000' and
      6  F123_AR_NR<='4404000000' and
      7  F123_KL_LEV_AR_NR='0631001000' and
      8  SRT_REK=2 and
      9  F123_BKJR>=0000 and
    10  F123_BKJR<=2011 and
    11  F123_FIRMA=2;
    Explained.
    Elapsed: 00:00:00.10
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1792   (1)| 00:00:22 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  5059 |   187K|  1792   (1)| 00:00:22 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  5059 |       |   145   (0)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    18 rows selected.
    Elapsed: 00:00:00.20
    SQL>
    SQL> rollback;
    Rollback complete.
    Elapsed: 00:00:00.01
    SQL>
    SQL> rem Set the ARRAYSIZE according to your application
    SQL> set autotrace traceonly arraysize 100
    SQL>
    SQL> alter session set tracefile_identifier = 'mytrace1';
    Session altered.
    Elapsed: 00:00:00.01
    SQL>
    SQL> rem if you're using bind variables
    SQL> rem define them here
    SQL>
    SQL> rem variable b_var1 number
    SQL> rem variable b_var2 varchar2(20)
    SQL>
    SQL> rem and initialize them
    SQL>
    SQL> rem exec :b_var1 := 1
    SQL> rem exec :b_var2 := 'DIAG'
    SQL>
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    Elapsed: 00:00:00.03
    SQL>
    SQL> -- put your statement here
    SQL> Select nvl(sum(BM_OPENST_D - BM_OPENST_CR),0)
      2  from bh.bh123gh
      3  where
      4  F123_AR_NR>='4400000000' and
      5  F123_AR_NR<='4404000000' and
      6  F123_KL_LEV_AR_NR='0631001000' and
      7  SRT_REK=2 and
      8  F123_BKJR>=0000 and
      9  F123_BKJR<=2011 and
    10  F123_FIRMA=2;
    Elapsed: 00:00:09.92
    Execution Plan
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1792   (1)| 00:00:22 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  5059 |   187K|  1792   (1)| 00:00:22 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  5059 |       |   145   (0)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    Statistics
              1  recursive calls
              0  db block gets
          11104  consistent gets
           9434  physical reads
              0  redo size
            574  bytes sent via SQL*Net to client
            519  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>
    SQL> disconnect
    Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    SQL>
    SQL> spool offTrace output :
    TKPROF: Release 11.2.0.1.0 - Development on Tue Nov 22 13:58:33 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Trace file: C:\Oracle\diag\rdbms\oravopak\oravopak\trace\oravopak_ora_7352_mytrace1.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    Select nvl(sum(BM_OPENST_D - BM_OPENST_CR),0)
    from bh.bh123gh
    where
    F123_AR_NR>='4400000000' and
    F123_AR_NR<='4404000000' and
    F123_KL_LEV_AR_NR='0631001000' and
    SRT_REK=2 and
    F123_BKJR>=0000 and
    F123_BKJR<=2011 and
    F123_FIRMA=2
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.03       9.86       9434      11104          0           1
    total        4      0.04       9.87       9434      11104          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=11104 pr=9434 pw=0 time=0 us)
      67250   TABLE ACCESS BY INDEX ROWID BH123GH (cr=11104 pr=9434 pw=0 time=10500177 us cost=1792 size=192242 card=5059)
      67250    INDEX RANGE SCAN I_BH123GH_ISABEL (cr=526 pr=550 pw=0 time=44363 us cost=145 size=0 card=5059)(object id 75061)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      Disk file operations I/O                        1        0.00          0.00
      db file sequential read                      8893        0.10          9.26
      db file scattered read                          7        0.01          0.05
      db file parallel read                           1        0.02          0.02
      SQL*Net message from client                     2        0.00          0.00
    ********************************************************************************DBMS_XPLAN.DISPLAY_CURSOR output :
    SQL>
    SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  g6pkv639sdfgw, child number 0
    Select /*+ gather_plan_statistics */ nvl(sum(BM_OPENST_DEB -
    BM_OPENST_CR),0) from bh.bh123gh where F123_AR_NR>='4400000000'
    and F123_AR_NR<='4404000000' and F123_KL_LEV_AR_NR='0631001000' and
    SRT_REK=2 and F123_BKJR>=0000 and F123_BKJR<=2011 and
    F123_FIRMA=2
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT             |                  |      1 |        |      1 |00:00:08.07 |   11104 |  13531 |
    |   1 |  SORT AGGREGATE              |                  |      1 |      1 |      1 |00:00:08.07 |   11104 |  13531 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |      1 |   5059 |  67250 |00:00:10.90 |   11104 |  13531 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |      1 |   5059 |  67250 |00:00:00.05 |     526 |    550 |
    Predicate Information (identified by operation id):
       2 - filter(("F123_BKJR">=0 AND "F123_BKJR"<=2011))
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000' AND
                  "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter(("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000'))
    27 rows selected.
    Elapsed: 00:00:01.15
    SQL>
    SQL> spool off

    I still find that my Oracle 10 DB is a tad faster.
    Comparing the plans shows that my Oracle 10 DB does less physical reads. I think I will get the same speed if I can find a way to change that behaviour on my Oracle 11 DB or can find the reason why it does that.
    SQL>
    SQL> show parameter user_dump_dest
    NAME                                 TYPE        VALUE
    user_dump_dest                       string      C:\ORACLE\PRODUCT\10.2.0\ADMIN
                                                     \ORAMULT\UDUMP
    SQL>
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.3
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    SQL>
    SQL> show parameter db_file_multi
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     16
    SQL>
    SQL> show parameter db_block_size
    NAME                                 TYPE        VALUE
    db_block_size                        integer     8192
    SQL>
    SQL> show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                       string      EXACT
    SQL>
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>
    SQL> select         sname
      2              , pname
      3              , pval1
      4              , pval2
      5  from
      6              sys.aux_stats$;
    SNAME                PNAME                     PVAL1 PVAL2
    SYSSTATS_INFO        STATUS                          COMPLETED
    SYSSTATS_INFO        DSTART                          04-17-2007 04:50
    SYSSTATS_INFO        DSTOP                           04-17-2007 04:50
    SYSSTATS_INFO        FLAGS                         1
    SYSSTATS_MAIN        CPUSPEEDNW           470.445344
    SYSSTATS_MAIN        IOSEEKTIM                    10
    SYSSTATS_MAIN        IOTFRSPEED                 4096
    SYSSTATS_MAIN        SREADTIM
    SYSSTATS_MAIN        MREADTIM
    SYSSTATS_MAIN        CPUSPEED
    SYSSTATS_MAIN        MBRC
    SYSSTATS_MAIN        MAXTHR
    SYSSTATS_MAIN        SLAVETHR
    13 rows selected.
    Elapsed: 00:00:00.01
    SQL>
    SQL> explain plan for
      2  Select nvl(sum(BM_OPENST_DEB- BM_OPENST_CR),0)
      3  from bh.bh123gh
      4  where
      5  F123_AR_NR>='4400000000' and
      6  F123_AR_NR<='4404000000' and
      7  F123_KL_LEV_AR_NR='0631001000' and
      8  SRT_REK=2 and
      9  F123_BKJR>=0000 and
    10  F123_BKJR<=2011 and
    11  F123_FIRMA=2;
    Explained.
    Elapsed: 00:00:00.00
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1594   (1)| 00:00:20 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  4776 |   177K|  1594   (1)| 00:00:20 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  4776 |       |   140   (1)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    18 rows selected.
    Elapsed: 00:00:00.32
    SQL>
    SQL> rollback;
    Rollback complete.
    Elapsed: 00:00:00.00
    SQL>
    SQL> rem Set the ARRAYSIZE according to your application
    SQL> set autotrace traceonly arraysize 100
    SQL>
    SQL> alter session set tracefile_identifier = 'mytrace1';
    Session altered.
    Elapsed: 00:00:00.00
    SQL>
    SQL> rem if you're using bind variables
    SQL> rem define them here
    SQL>
    SQL> rem variable b_var1 number
    SQL> rem variable b_var2 varchar2(20)
    SQL>
    SQL> rem and initialize them
    SQL>
    SQL> rem exec :b_var1 := 1
    SQL> rem exec :b_var2 := 'DIAG'
    SQL>
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    Elapsed: 00:00:00.00
    SQL>
    SQL> -- put your statement here
    SQL> Select nvl(sum(BM_OPENST_DEB- BM_OPENST_CR),0)
      2  from bh.bh123gh
      3  where
      4  F123_AR_NR>='4400000000' and
      5  F123_AR_NR<='4404000000' and
      6  F123_KL_LEV_AR_NR='0631001000' and
      7  SRT_REK=2 and
      8  F123_BKJR>=0000 and
      9  F123_BKJR<=2011 and
    10  F123_FIRMA=2;
    Elapsed: 00:00:00.12
    Execution Plan
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1594   (1)| 00:00:20 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  4776 |   177K|  1594   (1)| 00:00:20 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  4776 |       |   140   (1)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    Statistics
              1  recursive calls
              0  db block gets
          11001  consistent gets
              0  physical reads
              0  redo size
            459  bytes sent via SQL*Net to client
            396  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>
    SQL> disconnect
    Disconnected from Oracle Database 10g Release 10.2.0.3.0 - Production
    SQL>
    SQL> spool off

  • Query from oracle to MySql using dblink fetch all the rows in MySql table

    Hello,
    I am using Heterogeneous connectivity between oracle 10204 to Mysql database.
    I have a database link in the oracle side .
    I am query a table in MySql that have 10 million rows.
    Its doesnt matter if i am running :
    select * from "CDR_Accounts"@mysql where "id"=7675405;
    or
    select * from "CDR_Accounts"@mysql ;
    There is an index on the id column.
    Yet, it seems that the Mysql is feteching all the rows from the table , all the data is transfering to oracle over the dblink , and only after that the requested rows are get back to the client.
    The /etc/odbcinst.ini file is as follow:
    [odbcprd:oracle@odbc /software/oracle]$ cat /etc/odbcinst.ini
    [myodbc3]
    Description             = Mysql connector to mysql version 3.5
    Driver          = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3-3.51.25.so
    Driver64                = /usr/lib
    Setup           = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3S-3.51.25.so
    Setup64         = /usr/lib
    UsageCount              = 1
    CPTimeout               = 3600
    CPReuse         = Please advice
    Thanks

    When using a gateway it is always possible that a where clause is not sent to the remote database. This is called post processing and depends on several factors like the used ODBC driver, the columns and its data types but also if you specify certain functions in the where clause.
    The fastest way to see if post processing happens is in Oracle 11g the explain plan for a query. In 10g the plan does not always match the statement sent to the foreign database. Here it would be better to enable gateway tracing and setting the trace level to ON. This will log the statements sent to the foreign database and you can compare what statement was sent with the statement you've tried to execute.

  • Wrong result for query with like and %

    I have a strange problem with query with like and %.
    When I run this script:
    ALTER SESSION SET NLS_SORT = 'BINARY_CI';
    ALTER SESSION SET NLS_COMP = 'LINGUISTIC';
    -- SELECT * FROM NLS_SESSION_PARAMETERS;
    -- drop table test1;
    CREATE TABLE TEST1(K1 NVARCHAR2(80));
    INSERT INTO TEST1 VALUES ('gsdk');
    INSERT INTO TEST1 VALUES ('ąxyz');
    INSERT INTO TEST1 VALUES ('ŁFa');
    INSERT INTO TEST1 VALUES ('ła');
    INSERT INTO TEST1 VALUES ('Śab');
    INSERT INTO TEST1 VALUES ('Śrrrb');
    commit;
    select * from TEST1 where k1 like N'Ł%';
    I get this:
    K1
    ŁFa
    ła
    Śab <- WRONG
    Śrrrb <- WRONG
    4 rows selected
    When i change datatype to varchar2 this code work correct.
    Is this a bug or what ?
    The execution plan:
    PLAN_TABLE_OUTPUT
    SQL_ID d3d64aupz4bb5, child number 2
    select * from TEST1 where k1 like N'Ł%'
    Plan hash value: 4122059633
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 2 (100)| |
    |* 1 | TABLE ACCESS FULL| TEST1 | 1 | 82 | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter((NLSSORT("K1",'nls_sort=''BINARY_CI''')>=HEXTORAW('014200'
    ) AND NLSSORT("K1",'nls_sort=''BINARY_CI''')<HEXTORAW('01610100') ))
    Note
    - dynamic sampling used for this statement (level=2)

    DATABASE NLS CONFIGURATION:
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_COMP     BINARY
    NLS_SORT     BINARY
    Oracle version 11.2.0.2.0

  • Need complex query  with joins and AGGREGATE  functions.

    Hello Everyone ;
    Good Morning to all ;
    I have 3 tables with 2 lakhs record. I need to check query performance.. How CBO rewrites my query in materialized view ?
    I want to make complex join with AGGREGATE FUNCTION.
    my table details
    SQL> select from tab;*
    TNAME TABTYPE CLUSTERID
    DEPT TABLE
    PAYROLL TABLE
    EMP TABLE
    SQL> desc emp
    Name
    EID
    ENAME
    EDOB
    EGENDER
    EQUAL
    EGRADUATION
    EDESIGNATION
    ELEVEL
    EDOMAIN_ID
    EMOB_NO
    SQL> desc dept
    Name
    EID
    DNAME
    DMANAGER
    DCONTACT_NO
    DPROJ_NAME
    SQL> desc payroll
    Name
    EID
    PF_NO
    SAL_ACC_NO
    SALARY
    BONUS
    I want to make  complex query  with joins and AGGREGATE  functions.
    Dept names are : IT , ITES , Accounts , Mgmt , Hr
    GRADUATIONS are : Engineering , Arts , Accounts , business_applications
    I want to select records who are working in IT and ITES and graduation should be "Engineering"
    salary > 20000 and < = 22800 and bonus > 1000 and <= 1999 with count for males and females Separately ;
    Please help me to make a such complex query with joins ..
    Thanks in advance ..
    Edited by: 969352 on May 25, 2013 11:34 AM

    969352 wrote:
    why do you avoid providing requested & NEEDED details?I do NOT understand what do you expect ?
    My Goal is :
    1. When executing my own query i need to check expalin plan.please proceed to do so
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9010.htm#SQLRF01601
    2. IF i enable query rewrite option .. i want to check explain plan ( how optimizer rewrites my query ) ? please proceed to do so
    http://docs.oracle.com/cd/E11882_01/server.112/e16638/ex_plan.htm#PFGRF009
    3. My only aim is QUERY PERFORMANCE with QUERY REWRITE clause in materialized view.It is an admirable goal.
    Best Wishes on your quest for performance improvements.

Maybe you are looking for

  • I accidentally deleted all my notes. How do I get them back? Please!

    Some of the notes were created after I last synced my iPhone to iTunes so restoring backup will not recover all of them but is better than nothing and my last resort if there is no other solution to this problem. Is there any other way to get them ba

  • Iphoto keeps crashing on startup

    Hi, I installed Ilife '09 about a month ago, and since then I've had big problems with IPhoto. It loads fine for a couple of days, and then it stops working, just crashes on startup and gives me an error that it has unexpectedly quit. I tried deletin

  • Refreshing the BLOB

    I've made a small web application about movies. For those interested to see it work : go to http://www.gertcuppens.org/servlet/cluif. The web app works with servlets and JSP's. Now the problem is this : in the local version, I can select on the first

  • Probook 4530s drivers

    Hello, i got my laptop HP 4530s i3, it came with Linux preinstalled. I have installed windows 7 ultimate x64 and i tried to find as many drivers as possible. I couldnt find 5 drivers plz help me. laptop p/n: A1E83EA#ABV yellow signs: 1)Generic Blueto

  • A statement really.  iPhoto is the worst piece of software I've ever tried to use.  I plan to stop using it.

    Faces causing problems.   Distorted the photos when I moved them from my previous Mac OSX.   I don't want "faces" but don't how to disable that. It has created 30,000 records!  It has pulled faces of complete strangers out of some photos!