What Indexes should be created for improve performance of the sql query

Hello Admins
One of my user is facing slow performance issue while running the below query. Can someone, please guide me for the same. I want to know, what indexes should be created to improve the performance of this query. Also what else can be done to achieve the same.
SQL Query:-
SELECT UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_NUMBER))),
CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_NUMBER,
CGSBI_SHIP_DIST_S_EXTRACT.PO_SHIPMENT_NUMBER,
CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_NUMBER,
CGSBI_SHIP_DIST_S_EXTRACT.DISTRIBUTION_DATE,
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_LINE_ID))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PROJECT_ID))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ACCOUNT_DISTRIBUTION_CODE))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORACLE_ACCOUNT_NUMBER))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.COMPONENT_CODE))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TRANSACTION_CURRENCY_CODE))),
CGSBI_SHIP_DIST_S_EXTRACT.ORDER_QUANTITY, UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORDER_UOM))),
CGSBI_SHIP_DIST_S_EXTRACT.UNIT_PRICE_TRX_CURRENCY,
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.EXPENSE_TYPE_INDICATOR))),
CGSBI_SHIP_DIST_S_EXTRACT.SOR_ID,
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_CODE))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_DESC))),
CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_LEAD_TIME,
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.UNSPSC_CODE))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.BUYER_ID))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.REQUESTOR_ID))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.APPROVER_ID))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_SITE_ID))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_GSL_NUMBER))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SHIP_TO_LOCATION_CODE))),
UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TASK_ID))),
(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_RELEASE_ID)))
FROM
CGSBI_SHIP_DIST_S_EXTRACT
WHERE PO_NUMBER IS NOT NULL;
I generated the explain plan for this query and found the following:-
Explain Plan:-
SQL> explain plan for SELECT UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_NUMBER))),
2 CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_NUMBER,
3 CGSBI_SHIP_DIST_S_EXTRACT.PO_SHIPMENT_NUMBER,
4 CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_NUMBER,
5 CGSBI_SHIP_DIST_S_EXTRACT.DISTRIBUTION_DATE,
6 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_SHIP_DIST_LINE_ID))),
7 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PROJECT_ID))),
8 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ACCOUNT_DISTRIBUTION_CODE))),
9 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORACLE_ACCOUNT_NUMBER))),
10 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.COMPONENT_CODE))),
11 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TRANSACTION_CURRENCY_CODE))),
12 CGSBI_SHIP_DIST_S_EXTRACT.ORDER_QUANTITY, UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.ORDER_UOM))),
13 CGSBI_SHIP_DIST_S_EXTRACT.UNIT_PRICE_TRX_CURRENCY,
14 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.EXPENSE_TYPE_INDICATOR))),
15 CGSBI_SHIP_DIST_S_EXTRACT.SOR_ID,
16 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_CODE))),
17 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_DESC))),
18 CGSBI_SHIP_DIST_S_EXTRACT.PO_LINE_ITEM_LEAD_TIME,
19 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.UNSPSC_CODE))),
20 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.BUYER_ID))),
21 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.REQUESTOR_ID))),
22 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.APPROVER_ID))),
23 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_SITE_ID))),
24 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SUPPLIER_GSL_NUMBER))),
25 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.SHIP_TO_LOCATION_CODE))),
26 UPPER(LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.TASK_ID))),
27 (LTRIM(RTRIM(CGSBI_SHIP_DIST_S_EXTRACT.PO_RELEASE_ID)))
28 FROM
29 CGSBI_SHIP_DIST_S_EXTRACT
30 WHERE PO_NUMBER IS NOT NULL;
Explained.
SQL>
SQL>
SQL> SELECT * FROM TABLE(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 3891180274
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 77647 | 39M| 2006 (1)| 00:00:25 |
|* 1 | TABLE ACCESS FULL| CGSBI_SHIP_DIST_S_EXTRACT | 77647 | 39M| 2006 (1)| 00:00:25 |
Predicate Information (identified by operation id):
1 - filter("PO_NUMBER" IS NOT NULL)
13 rows selected.
SQL>
SQL>
Kindly suggest on this...
Thanks & Regards
-Naveen Gangil
Oracle DBA

Rafi is correct. Since po_number is the filter column, the only chance you have for using an index to access the table is on that column. However, if there are few (or none) rows with null po_number, you will always have FTS. Does the table have a PK ( which probably consists of at least po_number, line_number )? If that is the case po_number could never be null and in which case you are dumping the whole table and no indexing scheme is going to improve the queri's performance. You might, repeat might, see performance improvement if you cleanse the data in the table ( to eliminate the need for UPPER(LTRIM)RTRIM())) ) before querying it so the the data does not have to be massaged before returning it.

Similar Messages

  • I have a MAC Pro from 2011 currently running MAC OS 10.9.5.  This weekend I cloned the MAC HD drive to a new SSD drive for improved performance.  The clone was completed successfully with no errors.  After the clone completed I successfull restarted my sy

    I have a MAC Pro from 2011 currently running MAC OS 10.9.5.  This weekend I cloned the MAC HD drive to a new SSD drive for improved performance.  The clone was completed successfully with no errors.  After the clone completed I successfully restarted my system using the SSD as the boot device.  I then successfully tested all of my products, including Photoshop CS6 and all of its plug-ins.  I successfully tested the key features that I frequently use.  Today while attempting to launch Photoshop CS6 a message is being displayed indicating that a scratch disk cannot be found.  All drives are available on the system via the Finder and Disk Utility.  I can access all drives including the old MAC HD which is no longer the boot device.  I've even attempted to launch Photoshop from the old device yet the same error persist.  Is there a way to review/edit/change Photoshop preferences if Photoshop doesn't launch?  I've even restarted my system several times to see if that would resolve the issues.  Does anyone have any recommendations for this issue?  Have you previously address this issue? 
    Thank you Gregg Williams

    Boilerplate text:
    Reset Preferences
    http://forums.adobe.com/thread/375776
    1) Close the program and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (not reversible)
    or
    2) Move the Folder. See:
    http://www.bugge.com/Family-and-friends/Illy/illy.html
    --OB

  • How to improve performance of the attached query

    Hi,
    How to improve performance of the below query, Please help. also attached explain plan -
    SELECT Camp.Id,
    rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount,
    (SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
    rCam.AccountKey as AccountKey
    FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
    WHERE Camp.AccountKey = rCam.AccountKey
    AND Camp.AvCampaignKey = rCam.AvCampaignKey
    AND Camp.AccountKey = CamBilling.AccountKey
    AND Camp.CampaignKey = CamBilling.CampaignKey
    AND rCam.AccountKey = xSite.AccountKey
    AND rCam.AvSiteKey = xSite.AvSiteKey
    AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
    to_date('01-01-2011', 'DD-MM-YYYY')
    GROUP By rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount
    Explain Plan :-
    Description Object_owner Object_name Cost Cardinality Bytes
    SELECT STATEMENT, GOAL = ALL_ROWS 14 1 13
    SORT AGGREGATE 1 13
    VIEW GEMINI_REPORTING 14 1 13
    HASH GROUP BY 14 1 103
    NESTED LOOPS 13 1 103
    HASH JOIN 12 1 85
    TABLE ACCESS BY INDEX ROWID GEMINI_REPORTING RCAMSIT 2 4 100
    NESTED LOOPS 9 5 325
    HASH JOIN 7 1 40
    SORT UNIQUE 2 1 18
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY SITE 2 1 18
    INDEX RANGE SCAN GEMINI_PRIMARY SITE_I0 1 1
    TABLE ACCESS FULL GEMINI_PRIMARY SITE 3 27 594
    INDEX RANGE SCAN GEMINI_REPORTING RCAMSIT_I 1 1 5
    TABLE ACCESS FULL GEMINI_PRIMARY CAMPAIGN 3 127 2540
    TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY CAMBILLING 1 1 18
    INDEX UNIQUE SCAN GEMINI_PRIMARY CAMBILLING_U1 0 1

    duplicate thread..
    How to improve performance of attached query

  • Help required for improving performance of the Query

    Hello SAP Techies,
    I have MRP Query which shows Inventory projection by Calendar Year/Month wise.
    There are 2 variables Plant and Material in free charateristics where it has been restricted by replacement of Query result .
    Another query is Control M Query which is based on multiprovider. Multiprovider is created on 5 cubes.
    The Query is taking 20 -15 Mins to get the result.
    Due to replacement path by query result for the 2 variables first the control M Query is excuted. Business wanted to see all those materials in MRP query which are allocated to base plant hence they designed the query to use replacement Path by Query result. So it will get all the materials and plants from the control M query and will find the Invetory projection for the same selection in MRP query.
    Is there any way I can improve the performance of the Query.
    Query performance has been discussed innumerable times in the forums and there is a lot of information on the blogs and the WIKI - please search the forums before posting and if the existing posts do no answer your question satisfactorily then please raise a new post - else almost all the answers you get will be rehashed versions of previous posts ( and in most cases without attribution to the original author )
    Edited by: Arun Varadarajan on Apr 19, 2011 9:23 PM

    Hi ,
    Please see if you can make these changes currently to the report . It will help in improving the performance of the query
    1. Select the right read mode.
        Reading data during navigation minimizes the impact on
         the application server resources because only data that
        the user requires will be retrieved.
    2. Leverage filters as much as possible. Using filters contributes to
       reducing the number of database reads and the size of the result set,
        hereby significantly improving query runtimes.
       Filters are especially valuable when associated with u201Cbig
        dimensionsu201D where there is a large number of characteristics such as
        customers and document numbers.
    3. Reduce RKFs in the query to as few as possible. Also, define
    calculated & RKFs on the Infoprovider level instead of locally within the query.
    Regards
    Garima

  • How to improve performance of this SQL query?

    Hi,
    I have a query that tries to build a string (RPATH) for use as a url parameter. The query is:
    SELECT DISTINCT USERNAME, PASSWORD, ROLE, RIGHTS,
    DECODE(GEO, ROLE, 'g='||NVL(GEO,'none'), NULL)||
         DECODE(AREA, ROLE, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none'), NULL)||
         DECODE(REGION, ROLE, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none')||'&r='||NVL(REGION,'none'), NULL)||
         DECODE(DISTRICT, ROLE, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none')||'&r='||NVL(REGION,'none')||'&d='||NVL(DISTRICT,'none'), NULL)||
         DECODE(OFFICE, ROLE, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none')||'&r='||NVL(REGION,'none')||'&d='||NVL(DISTRICT,'none')||'&o='||NVL(OFFICE,'none')
    , NULL) RPATH
    FROM (SELECT U.*, L.*
         FROM (SELECT * FROM T_USERS WHERE USERNAME='xxx' AND PASSWORD='yyy') U, T_LOC_SUB L
         WHERE U.ROLE IN ('WW', L.GEO, L.AREA, L.REGION, L.DISTRICT, L.OFFICE))
    GROUP BY USERNAME, PASSWORD, ROLE, RIGHTS, GEO, AREA, REGION, DISTRICT, OFFICE;
    T_USERS is defined as
    CREATE TABLE T_USERS (
    username          VARCHAR2(10)     CONSTRAINT T_USERS_username_pk PRIMARY KEY,
    password          VARCHAR2(10),
    role                    CONSTRAINT T_USERS_role_FK REFERENCES T_LOC_MAIN(loc),
    rights          VARCHAR2(3)
    T_LOC_SUB is defined as
    CREATE TABLE T_LOC_SUB (
    geo          CONSTRAINT T_LOC_SUB_geo_FK REFERENCES T_LOC_MAIN(loc),
    area          CONSTRAINT T_LOC_SUB_area_FK REFERENCES T_LOC_MAIN(loc),
    region          CONSTRAINT T_LOC_SUB_region_FK REFERENCES T_LOC_MAIN(loc),
    district     CONSTRAINT T_LOC_SUB_district_FK REFERENCES T_LOC_MAIN(loc),
    office          CONSTRAINT T_LOC_SUB_office_FK REFERENCES T_LOC_MAIN(loc)
    T_LOC_MAIN is defined as
    CREATE TABLE T_LOC_MAIN (
    loc          VARCHAR2(4)     CONSTRAINT T_LOC_MAIN_loc_PK PRIMARY KEY,
    label          VARCHAR2(60),
    rank          NUMBER
    REGION and DISTRICT columns in T_LOC_SUB may be NULL at times. How can I rewrite the SQL to make it run faster or more efficiently?
    Please help.. Thank you..

    Hi,
    I just realised I can simplify the query to:
    SELECT DISTINCT USERNAME, PASSWORD, ROLE, RIGHTS,
    DECODE(ROLE,
         GEO, 'g='||NVL(GEO,'none'),
         AREA, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none'),
         REGION, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none')||'&r='||NVL(REGION,'none'),
         DISTRICT, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none')||'&r='||NVL(REGION,'none')||'&d='||NVL(DISTRICT,'none'),
         OFFICE, 'g='||NVL(GEO,'none')||'&a='||NVL(AREA,'none')||'&r='||NVL(REGION,'none')||'&d='||NVL(DISTRICT,'none')||'&o='||NVL(OFFICE,'none'),
         NULL) RPATH
    FROM (SELECT U.*, L.*
    FROM (SELECT * FROM T_USERS WHERE USERNAME='xxx' AND PASSWORD='yyy') U, T_LOC_SUB L
    WHERE U.ROLE IN ('WW', L.GEO, L.AREA, L.REGION, L.DISTRICT, L.OFFICE))
    GROUP BY USERNAME, PASSWORD, ROLE, RIGHTS, GEO, AREA, REGION, DISTRICT, OFFICE;
    Anyone can offer a better and more efficient improvement?
    Thanx!

  • Improve performance of the below query

    Hi Gurus,
    I have following query with the plan described. I need to improve the the performance of this query as it is using full table scans.
    How could achieve this.
    SELECT csf.*,
           NULL subject_flag,
           NULL next_exp_rewards_date,
           0 next_exp_rewards,
           (csf.rewards_cf - csf.rewards_bf - csf.total_rewards) * -1 reward_spent
      FROM crm_statement_fulfilled csf, crm_accounts ca
    WHERE csf.account_id = ca.account_id
       AND csf.procg_date = '01-jul-2012'
       AND ca.cycle_id = '01'
       AND ca.date_closed IS NULL
       AND ca.account_type IN ('LTT', 'LTY', 'LYI')
    ORDER BY csf.account_id
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
    Connected as crm
    SQL> desc crm_statement_fulfilled
    Name                  Type         Nullable Default Comments
    ACCOUNT_ID            NUMBER(19)                            
    CAMPAIGN_ID           NUMBER(10)                            
    CYCLE_ID              VARCHAR2(2)                           
    CUSTOMER_ID           NUMBER(14)   Y                        
    PROCG_DATE            DATE                                  
    GE_FULFILLED          VARCHAR2(1)  Y                        
    POINTS_DISPLAYED      VARCHAR2(1)  Y                        
    REASON_ID             VARCHAR2(10) Y                        
    POINTS_BF             NUMBER(10,2) Y                        
    PROMO_POINTS          NUMBER(10,2) Y                        
    GW_ADJ_POINTS         NUMBER(10,2) Y                        
    TOTAL_REWARDS         NUMBER(10,2) Y                        
    GW_FUL_POINTS         NUMBER(10,2) Y                        
    REC_POINTS            NUMBER(10,2) Y                        
    REC_FC_POINTS         NUMBER(10,2) Y                        
    POINTS_CONVERTED      NUMBER(10,2) Y                        
    POINTS_CF             NUMBER(10,2) Y                        
    TOTAL_POINTS          NUMBER(10,2) Y                        
    TOTAL_AIR_MILES_VALUE NUMBER(10)   Y                        
    POINTS_EXPIRED        NUMBER(10,2) Y                        
    CDT_IN_STR_POINTS     NUMBER(10,2) Y                        
    CDT_OUT_STR_POINTS    NUMBER(10,2) Y                        
    ANNIVERSARY_POINTS    NUMBER(10,2) Y                        
    LOYALTY_POINTS        NUMBER(10,2) Y                        
    NEXT_EXP_POINTS       NUMBER(10,2) Y                        
    NEXT_EXP_POINTS_DATE  DATE         Y                        
    REWARDS_BF            NUMBER(10,2) Y                        
    REWARDS_CF            NUMBER(10,2) Y                        
    SQL> desc crm_accounts
    Name               Type         Nullable Default Comments
    ACCOUNT_ID         NUMBER(19)                            
    CYCLE_ID           VARCHAR2(2)                           
    ACCOUNT_TYPE       VARCHAR2(3)                           
    SECURITY_PASSWORD  VARCHAR2(80) Y                        
    ACCESS_PASSWORD    VARCHAR2(80) Y                        
    AIRMILES_ID        VARCHAR2(16) Y                        
    DATE_OPENED        DATE                                  
    SEED               VARCHAR2(1)  Y                        
    AUTO_AIRMILES      VARCHAR2(1)  Y                        
    CURRENCY           VARCHAR2(3)  Y                        
    DATE_CLOSED        DATE         Y                        
    STORE_OPENED       VARCHAR2(4)  Y                        
    DATE_ACTIVATED     DATE         Y                        
    OLD_ACCOUNT_ID     NUMBER(19)   Y                        
    CARDPAC_ACCOUNT_ID NUMBER(19)   Y                        
    ORG_ID             VARCHAR2(10) Y                        
    LOGO_ID            VARCHAR2(10) Y                        
    PTS_TO_ACCOUNT_ID  NUMBER(19)   Y                        
    DMW_ACCOUNT_ID     VARCHAR2(19) Y                        
    SQL>

    Hi,
    Sid_ Z. wrote:
    Hi Gurus,
    I have following query with the plan described. I need to improve the the performance of this query as it is using full table scans...For all tuning requests, see the forum FAQ {message:id=9360003}
    AND csf.procg_date = '01-jul-2012'Don't try to compare a DATE (such as procg_date) with as VARCHAR2 (such as '01-jul-2012'.
    Use TO_DATE or a DATE literal instead.

  • Need help in improving the performance for the sql query

    Thanks in advance for helping me.
    I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. The data count which is updated in the target table is 2 million records and the target table has 15 million records.
    Any suggestions or solutions for improving performance are appreciated
    SQL query:
    update targettable tt
    set mnop = 'G',
    where ( x,y,z ) in
    select a.x, a.y,a.z
    from table1 a
    where (a.x, a.y,a.z) not in (
    select b.x,b.y,b.z
    from table2 b
    where 'O' = b.defg
    and mnop = 'P'
    and hijkl = 'UVW';

    987981 wrote:
    I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. And that meant what? Surely if you spend all that time and effort to try various approaches, it should mean something? Failures are as important teachers as successes. You need to learn from failures too. :-)
    The data count which is updated in the target table is 2 million records and the target table has 15 million records.Tables have rows btw, not records. Database people tend to get upset when rows are called records, as records exist in files and a database is not a mere collection of records and files.
    The failure to find a single faster method with the approaches you tried, points to that you do not know what the actual performance problem is. And without knowing the problem, you still went ahead, guns blazing.
    The very first step in dealing with any software engineering problem, is to identify the problem. Seeing the symptoms (slow performance) is still a long way from problem identification.
    Part of identifying the performance problem, is understanding the workload. Just what does the code task the database to do?
    From your comments, it needs to find 2 million rows from 15 million rows. Change these rows. And then write 2 million rows back to disk.
    That is not a small workload. Simple example. Let's say that the 2 million row find is 1ms/row and the 2 million row write is also 1ms/row. This means a 66 minute workload. Due to the number of rows, an increase in time/row either way, will potentially have 2 million fold impact.
    So where is the performance problem? Time spend finding the 2 million rows (where other tables need to be read, indexes used, etc)? Time spend writing the 2 million rows (where triggers and indexes need to be fired and maintained)? Both?

  • How to improve the performance of the attached query, Please help

    Hi,
    How to improve performance of the below query, Please help. also attached explain plan -
    SELECT Camp.Id,
    rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount,
    (SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
    rCam.AccountKey as AccountKey
    FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
    WHERE Camp.AccountKey = rCam.AccountKey
    AND Camp.AvCampaignKey = rCam.AvCampaignKey
    AND Camp.AccountKey = CamBilling.AccountKey
    AND Camp.CampaignKey = CamBilling.CampaignKey
    AND rCam.AccountKey = xSite.AccountKey
    AND rCam.AvSiteKey = xSite.AvSiteKey
    AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
    to_date('01-01-2011', 'DD-MM-YYYY')
    GROUP By rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount
    Explain Plan :-
    Description                    Object_owner          Object_name     Cost     Cardinality     Bytes     
    SELECT STATEMENT, GOAL = ALL_ROWS                              14     1     13
    SORT AGGREGATE                                                  1     13
    VIEW                         GEMINI_REPORTING               14     1     13
    HASH GROUP BY                                        14     1     103
    NESTED LOOPS                                        13     1     103
    HASH JOIN                                             12     1     85
    TABLE ACCESS BY INDEX ROWID     GEMINI_REPORTING     RCAMSIT          2     4     100
    NESTED LOOPS                                        9     5     325
    HASH JOIN                                        7     1     40
    SORT UNIQUE                                        2     1     18
    TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          SITE          2     1     18
    INDEX RANGE SCAN          GEMINI_PRIMARY          SITE_I0          1     1     
    TABLE ACCESS FULL          GEMINI_PRIMARY          SITE          3     27     594
    INDEX RANGE SCAN          GEMINI_REPORTING     RCAMSIT_I     1     1     5     
    TABLE ACCESS FULL     GEMINI_PRIMARY     CAMPAIGN                    3     127     2540
    TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          CAMBILLING     1     1     18
    INDEX UNIQUE SCAN     GEMINI_PRIMARY     CAMBILLING_U1                    0     1

    Hello,
    This has really nothing to do with the Oracle Forms product.
    Please, send the SQL or/and PL/SQL questions in the corresponding forums.
    Francois

  • Only one PR should be created for 3 months requirement.

    Dear All,
    In MRP run only 1 PR should be created for three months rquirement ,
    Eg: The procurement is done only once in 3 months, means PO is raised only once in 3 months for a material. So now system should create only 1 PR [1 lot] for 3 months requirement.
    I have tried to creating a new  lot size in OMI4 and i assigned "No of periods" as '3', and assigned in material master, but still system creates PR many PR's. What could be wrong,
    Thanks in Advance
    Praveen...........

    Any inputs ??

  • What t_code should be used for migration?

    Hello there,
    our user wants to  migrate  "output vat" account after being audited.
    actually , they start using SAP from 1st. January.2009 but now needs to migrate for reconciliation purpose.
    Journal should be 40) output VAT   /      50) Beginning Balance-BS.
    Since this output VAT does not need any tax code and base amount, i think normal FI transaction like F-02 is not an answer.
    Furthermore, LSMW is not strongly recommended at this time, considering line item to be created.
    Could you let me know what t_code should be used for this case?
    BR.
    J.
    Edited by: Jimmy Choi on Jun 30, 2009 5:41 PM

    Hi
    Note down the G/L accounts you are posting.
    Option 1 :In OBD4 see the account group. change the tax category mandatory to optional field for running the lsmw. afte completion, set the status as earlier.
    Option 2: goto fs00-> see the field status group.-> double click on the FSG-> see the taxes -> make the fields optional.
    with regards
    siva
    Edited by: Siva Rama Krishna Yanamandra on Jul 2, 2009 1:12 AM

  • HT1386 hi , i already get in to setting Icloud backup ,so what step should i do for my back up ?

    hi , i already get in to setting >Icloud> backup ,so what step should i do for my back up ?

    You can't actually terminate an iCloud account, though obviously you can simply log out of it on all your devices and then ignore it in future.
    I gather that the @icloud.com address is also the actual ID? You can't change that. However if your Apple ID that you use to log into iCloud is a non-Apple email address you can change that - please follow carefully the instructions here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudfaq2.html#6
    If it's this non-Apple address which is compromised then changing the ID will solve that. If it's the @icloud.com address which is compromised then you cannot change that though you can add up to three 'email aliases' - these are additional addresses (not accounts) which deliver into the same inbox as the main account. (In fact it's a good idea to give out alias addresses, rather than the main address, because if they attract spam you can easily change them.) (New aliases can only be @icloud.com ones; @me.com addresses cannot now be created.)
    You should be aware before you start that once you've created an alias you cannot turn that address into a full iCloud account or move it to another account.
    More information on aliases here: http://help.apple.com/icloud/#mm6b1a490a
    However if you add an alias the original address will still function, so if you are getting a lot of spam it will still arrive.
    You can get a completely new iCloud account simply by creating a new Apple ID at http://appleid.apple.com , for which you will need a new non-Apple address which has never been associated with an Apple ID.
    You will need to sign out of the old account on all your devices and sign in with the new ID.
    If none of this solves the problem and it is a security issue, go to https://getsupport.apple.com ; click 'See all products and services', then 'More Products and Services, then 'Apple ID', then 'Other Apple ID Topics' then 'Apple ID account Security'.

  • What setting should I use for Abbey Road drums?  Getting a cpu overload issue

    What setting should I use for Abbey Road drums (i.e. multi-output, stereo, etc)?  Getting a cpu overload issue.  I have a macbook pro, 4 gb ram, running Logic Pro 9.  Just 3 tracks of drums and a few real instrument tracks.  Can't find a guide in the manual for either Kontakt or Logic.  Thanks in advance!

    Hi
    AR drums are complete resource (CPU) hogs. They work better if you turn off as many of the AR internal plugins as you can.
    See section 4 (?) of the AR manual, which you can find within Kontakt (In the library area of Kontakt click hold the small "i" on the right of the "AR drummer" Library).
    Alternatively, your only solution is to increase the I/O buffer in Preferences:Audio, with the associated increase in latency
    CCT

  • What ssd should i get for my lenovo t61 please advise

    what ssd should i get for my lenovo t61 please advise i like the samsungs , will sata II work on it ?

    Skip the Samsung!
    The SSD Anthology: Understanding SSDs and New Drives from OCZ
    http://www.anandtech.com/storage/showdoc.aspx?i=3531
    The SSD Update: Vertex Gets Faster, New Indilinx Drives and Intel/MacBook Problems Resolved
    http://www.anandtech.com/storage/showdoc.aspx?i=3535
    I would go with Intel X25-M 80GB SATA MLC SSD $393.00
    http://www.newegg.com/Product/Product.aspx?Item=N82E16820167005
    Drives like the Samsung don't make a good main drive replacment yuo will see noticable pauses in applicatipon web browsing is one place where the pause is very noticable but people blame internet transfer instead of their hdd pausing while doing a file update.

  • What method should be used for resizing the particular JTable Column width

    I have a four table. Only one table which are on top have a table header. I want that when user resize the topmost table with a mouse other table colume also be resized automatically. So I want to know that what method should be used for resizing the particular JTable Column width.
    Thanks
    Lalit

    maybe you can implement a interface ComponentListener as well as ComponentAdapter with your topmost Table.
    for example:
    toptable.addComponentListener(
    new ComponentAdapter(){
    public void componentResized(ComponentEvent e){
    table1.setSize(....);
    table2.setSize(....);
    /*Optionally, you must also call function revalidate
    anywhere;*/
    );

  • I can't get Safari to load period. It quits immediately. According to the troubleshooting, I'm to un-install any third party plug ins. Can anyone tell me what I should be looking for? I don't recall installing anything that wasn't an upgrade.

    I can't get Safari to load period. It quits immediately. According to the troubleshooting, I'm to un-install any third party plug ins. Can anyone tell me what I should be looking for? I don't recall installing anything that wasn't an upgrade.

    Unplug your iBook from the AC power, shut it down and take the main battery out for about fifteen minutes. Then you can put the battery back in, plug the power back in and restart. This should reset the USB and FireWire ports.
    If that doesn't help, you could reset the Power Management Unit. Follow the instructions in Knowledge Base Article #14449 for resetting your PMU.
    You probably should also startup from your Mac OS X install disk and run the Disk Utility to "repair disk" on your hard drive. This will determine if you've got some kind of file directory/software problems with the files on your hard drive.
    I'm not much at decoding kernel panic logs, but this line jumps out:
    Kernel loadable modules in backtrace (with dependencies):
    com.apple.filesystems.udf(1.4.1)@0x28a79000
    Did you have a DVD movie in the drive at the time? DVD movie disks are UDF format, but not much else is.
    -Doug

Maybe you are looking for

  • Adobe Air Install Error 5100

    Can't seem to get this to install! Here's my Log file.... [2011-08-04:17:44:38] Runtime Installer begin with version 2.7.0.19530 on Windows Vista x86 [2011-08-04:17:44:38] Commandline is: -playerVersion=10,3,181,26 -sandboxType=remote -securityDomain

  • Problem to open the oracle XE Database

    Log file name :  oxe_backup_current.log XE Backup Log Recovery Manager: Release 10.2.0.1.0 - Production on Mon Sep 12 04:26:21 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: XE (DBID=2619028465, not open) RM

  • Lead time for Purchase items

    I had read that Lead time for Purchased items is calculated per 7 working days / week, by default. However, when I checked this, I found that the MRP planned orders were always considering our mfg calendar that has 5 working days / week. Anyone tried

  • Regex to find hidden fields in HTML page

    Hi all, I'm trying to extract all the hidden field in a particular form, I am currently using this: Pattern p1 = Pattern.compile("<INPUT(.*?)>"); which returns a multitude of input types is there any way I can just search for the hidden types, any in

  • HELP!!!! Accidently change all (.app) to open with Finder!

    I don't know how i did it but now ALL the Applications try to open with the finder. How can i change it back? Please help! imac G4 (15in. Flat Panel)   Mac OS X (10.1.x)