SQL Update statement taking too long..

Hi All,
I have a simple update statement that goes through a table of 95000 rows that is taking too long to update; here are the details:
Oracle Version: 11.2.0.1 64bit
OS: Windows 2008 64bit
desc temp_person;
Name                                                                                Null?    Type
PERSON_ID                                                                           NOT NULL NUMBER(10)
DISTRICT_ID                                                                     NOT NULL NUMBER(10)
FIRST_NAME                                                                                   VARCHAR2(60)
MIDDLE_NAME                                                                                  VARCHAR2(60)
LAST_NAME                                                                                    VARCHAR2(60)
BIRTH_DATE                                                                                   DATE
SIN                                                                                          VARCHAR2(11)
PARTY_ID                                                                                     NUMBER(10)
ACTIVE_STATUS                                                                       NOT NULL VARCHAR2(1)
TAXABLE_FLAG                                                                                 VARCHAR2(1)
CPP_EXEMPT                                                                                   VARCHAR2(1)
EVENT_ID                                                                            NOT NULL NUMBER(10)
USER_INFO_ID                                                                                 NUMBER(10)
TIMESTAMP                                                                           NOT NULL DATE
CREATE INDEX tmp_rs_PERSON_ED ON temp_person (PERSON_ID,DISTRICT_ID) TABLESPACE D_INDEX;
Index created.
ANALYZE INDEX tmp_PERSON_ED COMPUTE STATISTICS;
Index analyzed.
explain plan for update temp_person
  2  set first_name = (select trim(f_name)
  3                    from ext_names_csv
  4                               where temp_person.PERSON_ID=ext_names_csv.p_id
  5                               and   temp_person.DISTRICT_ID=ext_names_csv.ed_id);
Explained.
@?/rdbms/admin/utlxpls.sql
PLAN_TABLE_OUTPUT
Plan hash value: 3786226716
| Id  | Operation                   | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | UPDATE STATEMENT            |                | 82095 |  4649K|  2052K  (4)| 06:50:31 |
|   1 |  UPDATE                     | TEMP_PERSON    |       |       |            |          |
|   2 |   TABLE ACCESS FULL         | TEMP_PERSON    | 82095 |  4649K|   191   (1)| 00:00:03 |
|*  3 |   EXTERNAL TABLE ACCESS FULL| EXT_NAMES_CSV  |     1 |   178 |    24   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   3 - filter("EXT_NAMES_CSV"."P_ID"=:B1 AND "EXT_NAMES_CSV"."ED_ID"=:B2)
Note
   - dynamic sampling used for this statement (level=2)
19 rows selected.By the looks of it the update is going to take 6 hrs!!!
ext_names_csv is an external table that have the same number of rows as the PERSON table.
ROHO@rohof> desc ext_names_csv
Name                                                                                Null?    Type
P_ID                                                                                         NUMBER
ED_ID                                                                                        NUMBER
F_NAME                                                                                       VARCHAR2(300)
L_NAME                                                                                       VARCHAR2(300)Anyone can help diagnose this please.
Thanks
Edited by: rsar001 on Feb 11, 2011 9:10 PM

Thank you all for the great ideas, you have been extremely helpful. Here is what we did and were able to resolve the query.
We started with Etbin's idea to create a table from the ext table so that we can index and reference easier than an external table, so we did the following:
SQL> create table ext_person as select P_ID,ED_ID,trim(F_NAME) fst_name,trim(L_NAME) lst_name from EXT_NAMES_CSV;
Table created.
SQL> desc ext_person
Name                                                                                Null?    Type
P_ID                                                                                         NUMBER
ED_ID                                                                                        NUMBER
FST_NAME                                                                                     VARCHAR2(300)
LST_NAME                                                                                     VARCHAR2(300)
SQL> select count(*) from ext_person;
  COUNT(*)
     93383
SQL> CREATE INDEX EXT_PERSON_ED ON ext_person (P_ID,ED_ID) TABLESPACE D_INDEX;
Index created.
SQL> exec dbms_stats.gather_index_stats(ownname=>'APPD', indname=>'EXT_PERSON_ED',partname=> NULL , estimate_percent=> 30 );
PL/SQL procedure successfully completed.We had a look at the plan with the original SQL query that we had:
SQL> explain plan for update temp_person
  2  set first_name = (select fst_name
  3                    from ext_person
  4                               where temp_person.PERSON_ID=ext_person.p_id
  5                               and   temp_person.DISTRICT_ID=ext_person.ed_id);
Explained.
SQL> @?/rdbms/admin/utlxpls.sql
PLAN_TABLE_OUTPUT
Plan hash value: 1236196514
| Id  | Operation                    | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | UPDATE STATEMENT             |                | 93383 |  1550K|   186K (50)| 00:37:24 |
|   1 |  UPDATE                      | TEMP_PERSON    |       |       |            |          |
|   2 |   TABLE ACCESS FULL          | TEMP_PERSON    | 93383 |  1550K|   191   (1)| 00:00:03 |
|   3 |   TABLE ACCESS BY INDEX ROWID| EXTT_PERSON    |     9 |  1602 |     1   (0)| 00:00:01 |
|*  4 |    INDEX RANGE SCAN          | EXT_PERSON_ED  |     1 |       |     1   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   4 - access("EXT_PERSON"."P_ID"=:B1 AND "RS_PERSON"."ED_ID"=:B2)
Note
   - dynamic sampling used for this statement (level=2)
20 rows selected.As you can see the time has dropped to 37min (from 6 hrs). Then we decided to change the SQL query and use donisback's suggestion (using MERGE); we explained the plan for teh new query and here is the results:
SQL> explain plan for MERGE INTO temp_person t
  2  USING (SELECT fst_name ,p_id,ed_id
  3  FROM  ext_person) ext
  4  ON (ext.p_id=t.person_id AND ext.ed_id=t.district_id)
  5  WHEN MATCHED THEN
  6  UPDATE set t.first_name=ext.fst_name;
Explained.
SQL> @?/rdbms/admin/utlxpls.sql
PLAN_TABLE_OUTPUT
Plan hash value: 2192307910
| Id  | Operation            | Name         | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
|   0 | MERGE STATEMENT      |              | 92307 |    14M|       |  1417   (1)| 00:00:17 |
|   1 |  MERGE               | TEMP_PERSON  |       |       |       |            |          |
|   2 |   VIEW               |              |       |       |       |            |          |
|*  3 |    HASH JOIN         |              | 92307 |    20M|  6384K|  1417   (1)| 00:00:17 |
|   4 |     TABLE ACCESS FULL| TEMP_PERSON  | 93383 |  5289K|       |   192   (2)| 00:00:03 |
|   5 |     TABLE ACCESS FULL| EXT_PERSON   | 92307 |    15M|       |    85   (2)| 00:00:02 |
Predicate Information (identified by operation id):
   3 - access("P_ID"="T"."PERSON_ID" AND "ED_ID"="T"."DISTRICT_ID")
Note
   - dynamic sampling used for this statement (level=2)
21 rows selected.As you can see, the update now takes 00:00:17 to run (need to say more?) :)
Thank you all for your ideas that helped us get to the solution.
Much appreciated.
Thanks

Similar Messages

  • Update statement taking too long to execute

    Hi All,
    I'm trying to run this update statement. But its taking too long to execute.
        UPDATE ops_forecast_extract b SET position_id = (SELECT a.row_id
            FROM s_postn a
            WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME)))
            WHERE position_level = 7
            AND b.am_id IS NULL;
            SELECT COUNT(*) FROM S_POSTN;
            214665
            SELECT COUNT(*) FROM ops_forecast_extract;
            49366
    SELECT count(*)
            FROM s_postn a, ops_forecast_extract b
            WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME));
    575What could be the reason for update statement to execute so long?
    Thanks

    polasa wrote:
    Hi All,
    I'm trying to run this update statement. But its taking too long to execute.
    What could be the reason for update statement to execute so long?You haven't said what "too long" means, but a simple reason could be that the scalar subquery on "s_postn" is using a full table scan for each execution. Potentially this subquery gets executed for each row of the "ops_forecast_extract" table that satisfies your filter predicates. "Potentially" because of the cunning "filter/subquery optimization" of the Oracle runtime engine that attempts to cache the results of already executed instances of the subquery. Since the in-memory hash table that holds these cached results is of limited size, the optimization algorithm depends on the sort order of the data and could suffer from hash collisions it's unpredictable how well this optimization works in your particular case.
    You might want to check the execution plan, it should tell you at least how Oracle is going to execute the scalar subquery (it doesn't tell you anything about this "filter/subquery optimization" feature).
    Generic instructions how to generate a useful explain plan output and how to post it here follow:
    Could you please post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your statement. Please use the {noformat}[{noformat}code{noformat}]{noformat} tag before and {noformat}[{noformat}/code{noformat}]{noformat} tag after or the {noformat}{{noformat}code{noformat}}{noformat} tag before and after to enhance readability of the output provided:
    In SQL*Plus:
    SET LINESIZE 130
    EXPLAIN PLAN FOR <your statement>;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Note that the package DBMS_XPLAN.DISPLAY is only available from 9i on.
    In 9i and above, if the "Predicate Information" section is missing from the DBMS_XPLAN.DISPLAY output but you get instead the message "Plan table is old version" then you need to re-create your plan table using the server side script "$ORACLE_HOME/rdbms/admin/utlxplan.sql".
    In previous versions you could run the following in SQL*Plus (on the server) instead:
    @?/rdbms/admin/utlxplsA different approach in SQL*Plus:
    SET AUTOTRACE ON EXPLAIN
    <run your statement>;will also show the execution plan.
    In order to get a better understanding where your statement spends the time you might want to turn on SQL trace as described here:
    When your query takes too long ...
    and post the "tkprof" output here, too.
    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/

  • SQL Statement taking too long to get the data

    Hi,
    There are over 2500 records in a table and when retrieve all using ' SELECT * From Table' it is taking too long to get the data. ie .. 4.3 secs.
    Is there any possible way to shorten the process time.
    Thanks

    Hi Patrick,
    Here is the sql statement and table desc.
    ID     Number
    SN     Varchar2(12)
    FN     Varchar2(30)
    LN     Varchar2(30)
    By     Varchar(255)
    Dt     Date(7)
    Add     Varchar2(50)
    Add1     Varchar2(30)
    Cty     Varchar2(30)
    Stt     Varchar2(2)
    Zip     Varchar2(12)
    Ph     Varchar2(15)
    Email     Varchar2(30)
    ORgId     Number
    Act     Varchar2(3)     
    select A."FN" || '' '' || A."LN" || '' ('' || A."SN" || '')'' "Name",
    A."By", A."Dt",
    A."Add" || ''
    '' || A."Cty" || '', '' || A."Stt" || '' '' || A."Zip" "Location",
    A."Ph", A."Email", A."ORgId", A."ID",
    A."SN" "OSN", A."Act"
    from "TBL_OPTRS" A where A."ID" <> 0 ';
    I'm displaying all rows in a report.
    if I use 'select * from TBL_OPTRS' , this also takes 4.3 to 4.6 secs.
    Thanks.

  • Update is taking too long to install

    I'm in the process of installing an update to iTunes (11.0.4) and what I think is a security update on my MBP. However, the installation process is taking too long. First, it was stuck for about 2 hours on "registering updated components", and now (for the last hour) I'm seeing a blue screen with the spinning gear. Should I just keep waiting? Has anyone had a similar experience? 

    zornie,
    Try going to safari>preferences, general tab, and setting the "save downloaded files to your desktop (if desktop is not in the drop down menu, click other then select desktop from the left side bar). This will download the update to your dektop as a stand alone installer. Also if for some reason the download is interupted you can click the download icon on the desktop and it will resume where it left off. When the download is complete double click the icon/installer package and follow the prompts. Do them one at a time. (Thsi is not using software update, which can some times get corrupted during DL, especially if your are doing it wireless)
    Security update:
    http://support.apple.com/kb/DL1660
    iTunes:
    http://www.apple.com/itunes/download/
    Hope this helps

  • Update statement takes too long to run

    Hello,
    I am running this simple update statement, but it takes too long to run. It was running for 16 hours and then I cancelled it. It was not even finished. The destination table that I am updating has 2.6 million records, but I am only updating 206K records. If add ROWNUM <20 to the update statement works just fine and updates the right column with the right information. Do you have any ideas what could be wrong in my update statement? I am also using a DB link since CAP.ESS_LOOKUP table resides in different db from the destination table. We are running 11g Oracle Db.
    UPDATE DEV_OCS.DOCMETA IPM
    SET IPM.XIPM_APP_2_17 = (SELECT DISTINCT LKP.DOC_STATUS
    FROM [email protected] LKP
    WHERE LKP.DOC_NUM = IPM.XIPM_APP_2_1 AND
    IPM.XIPMSYS_APP_ID = 2
    WHERE
    IPM.XIPMSYS_APP_ID = 2;
    Thanks,
    Ilya

    matthew_morris wrote:
    In the first SQL, the SELECT against the remote table was a correlated subquery. the 'WHERE LKP.DOC_NUM = IPM.XIPM_APP_2_1 AND IPM.XIPMSYS_APP_ID = 2" means that the subquery had to run once for each row of DEV_OCS.DOCMETA being evaluated. This might have meant thousands of iterations, meaning a great deal of network traffic (not to mention each performing a DISTINCT operation). Queries where the data is split between two or more databases are much more expensive than queries using only tables in a single database.Sorry to disappoint you again, but with clause by itself doesn't prevent from "subquery had to run once for each row of DEV_OCS.DOCMETA being evaluated". For example:
    {code}
    SQL> set linesize 132
    SQL> explain plan for
    2 update emp e
    3 set deptno = (select t.deptno from dept@sol10 t where e.deptno = t.deptno)
    4 /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 3247731149
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | UPDATE STATEMENT | | 14 | 42 | 17 (83)| 00:00:01 | | |
    | 1 | UPDATE | EMP | | | | | | |
    | 2 | TABLE ACCESS FULL| EMP | 14 | 42 | 3 (0)| 00:00:01 | | |
    | 3 | REMOTE | DEPT | 1 | 13 | 0 (0)| 00:00:01 | SOL10 | R->S |
    PLAN_TABLE_OUTPUT
    Remote SQL Information (identified by operation id):
    3 - SELECT "DEPTNO" FROM "DEPT" "T" WHERE "DEPTNO"=:1 (accessing 'SOL10' )
    16 rows selected.
    SQL> explain plan for
    2 update emp e
    3 set deptno = (with t as (select * from dept@sol10) select t.deptno from t where e.deptno = t.deptno)
    4 /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 3247731149
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | UPDATE STATEMENT | | 14 | 42 | 17 (83)| 00:00:01 | | |
    | 1 | UPDATE | EMP | | | | | | |
    | 2 | TABLE ACCESS FULL| EMP | 14 | 42 | 3 (0)| 00:00:01 | | |
    | 3 | REMOTE | DEPT | 1 | 13 | 0 (0)| 00:00:01 | SOL10 | R->S |
    PLAN_TABLE_OUTPUT
    Remote SQL Information (identified by operation id):
    3 - SELECT "DEPTNO" FROM "DEPT" "DEPT" WHERE "DEPTNO"=:1 (accessing 'SOL10' )
    16 rows selected.
    SQL>
    {code}
    As you can see, WITH clause by itself guaranties nothing. We must force optimizer to materialize it:
    {code}
    SQL> explain plan for
    2 update emp e
    3 set deptno = (with t as (select /*+ materialize */ * from dept@sol10) select t.deptno from t where e.deptno = t.deptno
    4 /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 3568118945
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | UPDATE STATEMENT | | 14 | 42 | 87 (17)| 00:00:02 | | |
    | 1 | UPDATE | EMP | | | | | | |
    | 2 | TABLE ACCESS FULL | EMP | 14 | 42 | 3 (0)| 00:00:01 | | |
    | 3 | TEMP TABLE TRANSFORMATION | | | | | | | |
    | 4 | LOAD AS SELECT | SYS_TEMP_0FD9D6603_1CEEEBC | | | | | | |
    | 5 | REMOTE | DEPT | 4 | 80 | 3 (0)| 00:00:01 | SOL10 | R->S |
    PLAN_TABLE_OUTPUT
    |* 6 | VIEW | | 4 | 52 | 2 (0)| 00:00:01 | | |
    | 7 | TABLE ACCESS FULL | SYS_TEMP_0FD9D6603_1CEEEBC | 4 | 80 | 2 (0)| 00:00:01 | | |
    Predicate Information (identified by operation id):
    6 - filter("T"."DEPTNO"=:B1)
    Remote SQL Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    5 - SELECT "DEPTNO","DNAME","LOC" FROM "DEPT" "DEPT" (accessing 'SOL10' )
    25 rows selected.
    SQL>
    {code}
    I do know hint materialize is not documented, but I don't know any other way besides splitting statement in two to materialize it.
    SY.

  • Update statement time too long

    HI
    im doing this update statement using toad and its been an hour now and not finished ( its only 900 records)
    and when i try to update 20 records only it takes about 3min
    update IC_ITEM_MST set WHSE_ITEM_ID ='503' where ITEM_NO like 'PP%'
    thnx
    Edited by: george samaan on Dec 21, 2008 10:35 PM

    select * from v$locked_object
    gave me this
    XIDUSN XIDSLOT XIDSQN OBJECT_ID SESSION_ID ORACLE_USERNAME
    OS_USER_NAME PROCESS LOCKED_MODE
    11 15 10999 36834 97 APPS
    appltst2 897256 3
    10 47 347465 63200 14 APPS
    Administrator 3124:2324 2
    10 47 347465 63569 14 APPS
    Administrator 3124:2324 2
    10 47 347465 63867 14 APPS
    Administrator 3124:2324 3
    10 47 347465 64380 14 APPS
    Administrator 3124:2324 2
    10 47 347465 64447 14 APPS
    Administrator 3124:2324 2
    10 47 347465 64934 14 APPS
    XIDUSN XIDSLOT XIDSQN OBJECT_ID SESSION_ID ORACLE_USERNAME
    OS_USER_NAME PROCESS LOCKED_MODE
    Administrator 3124:2324 2
    10 47 347465 78678 14 APPS
    Administrator 3124:2324 3
    10 47 347465 79069 14 APPS
    Administrator 3124:2324 3
    10 47 347465 64026 14 APPS
    Administrator 3124:2324 3
    10 47 347465 93468 14 APPS
    Administrator 3124:2324 3
    10 47 347465 209903 14 APPS
    Administrator 3124:2324 3
    10 47 347465 80084 14 APPS
    Administrator 3124:2324 3
    XIDUSN XIDSLOT XIDSQN OBJECT_ID SESSION_ID ORACLE_USERNAME
    OS_USER_NAME PROCESS LOCKED_MODE
    0 0 0 36944 60 APPS
    appltst2 1572894 3
    14 rows selected.

  • Insert statement taking too long

    Hi,
    I am inserting in a TAB_A from TAB_B using following statement
    INSERT INTO TAB_A
    SELECT * FROM TAB_B;
    In TAB_A more than 98000000 rows exits. While in TAB_B rows may be vary from 1000 to 1000000.
    TAB_A is a partition table.
    This insert is taking more than 3 hrs to insert 800000 rows from TAB_B.
    I need to improve performance of this insert statement.
    Can you please help me ???

    Hi,
    Try this:
    INSERT INTO tab_a SELECT /*+append*/  * FROM tab_b;                                                                                                                                                                                           

  • Update statement taking too much time

    Hi All,
    I defined a cursor in which there are almost 94 lakh records and i want to update few fields of a table from another table which takes data over a dblink.
    my cursor is
    cursor c_tpo is
          select t.loc_loc_id,
                 t.till_no,
                 t.transaction_date,
                 t.sales_audit_txn_no,
                 t.third_party_order_ref
            from dwt_om_email_addresses t
           where (t.merc_loaded_date_time is null or t.ws_ordered_date_time is null or
                 t.copos_ordered_date_time is null)
    -- And for loop is
    for i in c_tpo loop
        select count(*)
          into ln_count
          from web_sales@nrstp
         where dmw_order = i.third_party_order_ref;
        if ln_count = 1 then
          select date_loaded, order_date, order_date, pkt_ctrl_nbr
            into ld_merc_load_date,
                 ld_ws_order_date,
                 ld_cop_order_date,
                 lc_pkt_ctrl_nbr
            from web_sales@nrstp
           where dmw_order = i.third_party_order_ref;
          update dwt_om_email_addresses t
             set merc_loaded_date_time   = ld_merc_load_date,
                 ws_ordered_date_time    = ld_ws_order_date,
                 copos_ordered_date_time = ld_cop_order_date
           where t.loc_loc_id = i.loc_loc_id
             and t.till_no = i.till_no
             and t.transaction_date = i.transaction_date
             and t.sales_audit_txn_no = i.sales_audit_txn_no;
      end if;
        ln_count          := 0;
        ln_count_pkt      := 0;
        ld_merc_load_date := null;
        ld_ws_order_date  := null;
        ld_cop_order_date := null;
        ld_pkms_date_time := null;
        lc_pkt_ctrl_nbr   := null;
      end loop;
      -----------The ln_count is used to avoid the exception no_data_found and too_many_rows. How do I speed up the process as it takes 1 hr to update 500 records.
    What would be the best approach to achieve this in less time.
    Thanks

    if you check the your condition some where you have metioned
    dmw_order = t.third_party_order_ref
    if both of these are unique keys or primary key then there is no problem
    but if for there are multiple values edit the query by using
    rownum <= 1
    update dwt_om_email_addresses t
    set (merc_loaded_date_time,ws_ordered_date_time,copos_ordered_date_time) =(select date_loaded, order_date, order_date, pkt_ctrl_nbr from( select date_loaded, order_date, order_date, pkt_ctrl_nbr
                                                                                 from web_sales@nrstp
                                                                                  where dmw_order = t.third_party_order_ref)
    where rownum<=1)
    where exists  (select '1'
                  from web_sales@nrstp i
                  where t.loc_loc_id = i.loc_loc_id
                  and t.till_no = i.till_no
                  and t.transaction_date = i.transaction_date
                  and t.sales_audit_txn_no = i.sales_audit_txn_no
                  and (t.merc_loaded_date_time is null or t.ws_ordered_date_time is null or
                 t.copos_ordered_date_time is null));and for exists clause there is no problem
    Edited by: 810345 on Jun 10, 2011 4:07 PM
    Edited by: 810345 on Jun 10, 2011 4:08 PM

  • HT4623 Why is Software update is taking too long?

    Im trying to update my iPhone 3gs 5.0.1 to 6.1.2 and I received an Error "iPhone software update failed" i tried it several times but nothing happened

    Are you trying to do on your phone or with iTunes?   Most people here would advise to do an update in iTunes and to not forget to back up your phone first before doing so.

  • Shut immediate taking too long

    hello,
    SQL> shut immediate;
    taking too long and no update, what should i do?

    nomee wrote:
    hello,
    SQL> shut immediate;
    taking too long and no update, what should i do?The same request I made to everybody, "Just pretend we don't know any thing about your environment. picture it with as much detail as possible".
    Figure out ... you are the mechanics and suddenly I arrive and I say ... my car doesn't seem to work fine, what do you think it is?
    In this case it is very important to know the version, it normally has to do with checkpoint tuning, number of transactions, number of datafiles. So I suggest you to detail what are you talking about please.
    ~ Madrid
    http://hrivera99.blogspot.com

  • Update statement taking long time

    Hi All,
    The following query is taking too much time for update the 100000 records.
    Please tell me how can this query time get reduced.
    DECLARE
       CURSOR cur IS
         SELECT c.account_id FROM crm_statement_fulfilled_sid c;
    BEGIN
       FOR i IN cur LOOP
         UPDATE crm_statement_fulfilled_sid a
            SET a.rewards_expired = (SELECT abs(nvl(SUM(t.VALUE), 0))
                                       FROM crm_reward_txns t
                                      WHERE txn_date BETWEEN
                                            (SELECT (decode(MAX(csf.procg_date) + 1,
                                                            NULL,
                                                            to_date('01-May-2011',
                                                                    'DD-MM-YYYY'),
                                                            MAX(csf.procg_date) + 1))
                                               FROM crm_statement_fulfilled csf
                                              WHERE csf.procg_date < '01-aug-2012'
                                                AND account_id = i.account_id) /*points_start_date_in*/
                                        AND '01-aug-2012'
                                        AND reason = 'RE'
                                        AND t.account_id = i.account_id);
       END LOOP;
    END;Any help?
    Sid

    Hoek wrote:
    Second: you're doing row-by-row (= slow-by-slow) processing.
    See if you can rewrite your code into a single SQL UPDATE statement that will process an entire SET at once.Well to be nitpicking. The op already does a single big update. He just does it again and again and again for each account id. Each time completely overwriting the values from the last account id.

  • Why iPad2 is taking too long time for a software update?

    Hi, i have iPad2 with iOS 4.3, now I'd like to update to iOS 6.1.2, but it is taking too long time to update when i connect to iYunes.My internet speed is 15mbps.I am unable to understand the problem.Please help me

    Hi, i have iPad2 with iOS 4.3, now I'd like to update to iOS 6.1.2, but it is taking too long time to update when i connect to iYunes.My internet speed is 15mbps.I am unable to understand the problem.Please help me

  • I am trying to update my ipad mini but taking too long time 5 hours

    i am trying to update my ipad mini to ios 7  but taking too long time 5 hours so what i have to do
    Message was edited by: GOPAL DHRUW

    You can try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.
    Try again to see if the problem persists.

  • My iPod was updating to iOS 6 and i shut it off during the update because it was taking too long and now my screen in baby blue i've tried to drain the battery but when i plugged it in to charge the blue screen came back on.I dont know what to do

    My iPod was updating to iOS 6 and i shut it off during the update because it was taking too long and now my screen in baby blue i've tried to drain the battery but when i plugged it in to charge the blue screen came back on.I dont know what to do

    Try:
    - iOS: Not responding or does not turn on
    - If not successful and you can't fully turn the iPod fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • My iPad is taking too long to contact update software server during recovery.

    My iPad is taking too long to contact update software server during recovery. It can go on for 30 minutes and it would not load. What can I do?

    If the links are blocked by who-ever, you will keep getting those errors.
    About the only option would be to use a proxy.
    http://www.bing.com/search?q=proxy

Maybe you are looking for

  • Report on Modvat balance

    Hi Guru's, Do we have any standard report on Modvat balance. Thanks, Reddy.

  • Campus data collection problem

    I installed this patch for UT support for Nexus 7k in my LMS3.2 (Solaris 10) At the end it asked to reintit the camput manager database, after the reinit I ran the data colletion but it found zero devices. Data collection ran again this morning at it

  • High Sea Sales scenarion?

    Hi, Can somebody please describe the High Sea Sales scenarion in actual and its mapping in the SAP on the transactional level. Thanks Rajiv

  • Print very big JTable

    Hi all, i have to print a very big table with 100000 rows and 6 columns, i have put the System.gc() at the end of the print method but when i print the table the print process become too big (more or less 700 kB for page and there are 1048 pages). It

  • JDev 10.1.3.3 + ADF

    hi, We developed application using ADF 10.1.3.3, we are seeing some strange thing happeneing in the appllication. We see some time the forms gets displayed twice and some time when we click the LOV 5 windows opens. Has any body faces these issues? Pl