Running long time- need help

Following Query running more than 4 hrs. could somone please suggest me to tune this query.
SELECT fi_contract_id, a.cust_id, a.product_id, a.currency_cd,
ROUND (DECODE (SUBSTR (a.ACCOUNT, 1, 4), '4992', posted_tran_amt, 0),
2
) ftp_amt,
ROUND (DECODE (SUBSTR (a.ACCOUNT, 1, 4), '4992', posted_base_amt, 0),
2
) ftp_base_amt,
ROUND (DECODE (SUBSTR (a.ACCOUNT, 1, 4),
'4994', posted_tran_amt,
'4995', posted_tran_amt,
0
2
) col_amt,
ROUND (DECODE (SUBSTR (a.ACCOUNT, 1, 4),
'4994', posted_base_amt,
'4995', posted_base_amt,
0
2
) col_base_amt,
ROUND (DECODE (SUBSTR (a.ACCOUNT, 1, 3), '499', 0, posted_tran_amt),
2
) closing_bal,
a.ACCOUNT, a.deptid, a.business_unit,
CASE
WHEN a.ACCOUNT LIKE '499%'
THEN '990'
ELSE a.operating_unit
END operating_unit,
a.base_currency, NVL (TRIM (pf_system_code), a.SOURCE) pf_system_code,
b.setid, a.channel_id, scb_arm_code, scb_tp_product, scb_tranche_id,
CASE
WHEN pf_system_code = 'CLS'
THEN scb_bncpr_flg
ELSE NULL
END tranche_purpose,
CASE
WHEN pf_system_code = 'IMX'
AND SUBSTR (scb_bncpr_flg, 1, 1) IN ('Y', 'N')
THEN SUBSTR (scb_bncpr_flg, 1, 1)
ELSE NULL
END lc_ind,
CASE
WHEN pf_system_code = 'IMX'
AND SUBSTR (scb_bncpr_flg, 1, 1) IN ('Y', 'N')
THEN SUBSTR (scb_bncpr_flg, 2, 3)
WHEN pf_system_code = 'IMX'
AND SUBSTR (scb_bncpr_flg, 1, 1) NOT IN ('Y', 'N')
THEN SUBSTR (scb_bncpr_flg, 1, 3)
ELSE NULL
END bill_branch_id,
CASE
WHEN pf_system_code = 'IMX'
AND SUBSTR (scb_bncpr_flg, 1, 1) IN ('Y', 'N')
THEN SUBSTR (scb_bncpr_flg, 5, 1)
WHEN pf_system_code = 'IMX'
AND SUBSTR (scb_bncpr_flg, 1, 1) NOT IN ('Y', 'N')
THEN SUBSTR (scb_bncpr_flg, 4, 1)
ELSE NULL
END section_id,
CASE
WHEN pf_system_code = 'IFS'
THEN SUBSTR (scb_bncpr_flg, 1, 1)
ELSE NULL
END recourse_ind,
CASE
WHEN pf_system_code = 'IFS'
THEN SUBSTR (scb_bncpr_flg, 2, 1)
ELSE NULL
END disclosure_ind,
TO_CHAR (LAST_DAY (upload_date), 'DDMMYYYY')
FROM ps_fi_ildgr_f00 a,
(SELECT c.business_unit, c.fi_instrument_id, c.scb_arm_code,
c.scb_tp_product, c.scb_tranche_id, c.scb_bncpr_flg
FROM ps_fi_iother_r00 c, ps_scb_bus_unit b1
WHERE c.business_unit = b1.business_unit
AND b1.setid = 'PKSTN'
AND c.asof_dt =
(SELECT MAX (c1.asof_dt)
FROM ps_fi_iother_r00 c1
WHERE c.business_unit = c1.business_unit
AND c1.fi_instrument_id = c.fi_instrument_id)) c,
ps_scb_bus_unit b,
(SELECT upload_date - 15 upload_date
FROM stg_ftp_trans_bal_tb
WHERE setid = 'PKSTN' AND ROWNUM < 2),
(SELECT i.business_unit, i.fi_instrument_id, i.pf_system_code,
i.fi_contract_id
FROM ps_fi_instr_f00 i, ps_scb_bus_unit b1
WHERE i.business_unit = b1.business_unit
AND b1.setid = 'PKSTN'
AND (i.asof_dt) =
(SELECT MAX (i1.asof_dt)
FROM ps_fi_instr_f00 i1
WHERE i.business_unit = i1.business_unit
AND i1.fi_instrument_id = i.fi_instrument_id)) d
WHERE a.business_unit = b.business_unit
AND a.business_unit = c.business_unit
AND a.business_unit = d.business_unit
AND a.fi_instrument_id = c.fi_instrument_id(+)
AND a.fi_instrument_id = d.fi_instrument_id(+)
AND fiscal_year = TO_CHAR (upload_date, 'YYYY')
AND a.ACCOUNT != '191801'
AND a.pf_scenario_id LIKE '%M_'
AND accounting_period = TO_CHAR (upload_date, 'MM')
AND b.setid = 'PKSTN'
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 1 | 225 | | 14059 (2)| | | | | |
|* 1 | FILTER | | | | | | | | | | |
| 2 | PX COORDINATOR | | | | | | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10006 | 962 | 211K| | 13578 (2)| | | Q1,06 | P->S | QC (RAND) |
|* 4 | HASH JOIN | | 962 | 211K| | 13578 (2)| | | Q1,06 | PCWP | |
| 5 | PX RECEIVE | | 977 | 190K| | 4273 (2)| | | Q1,06 | PCWP | |
| 6 | PX SEND BROADCAST | :TQ10004 | 977 | 190K| | 4273 (2)| | | Q1,04 | P->P | BROADCAST |
PLAN_TABLE_OUTPUT
|* 7 | HASH JOIN | | 977 | 190K| | 4273 (2)| | | Q1,04 | PCWP | |
| 8 | BUFFER SORT | | | | | | | | Q1,04 | PCWC | |
| 9 | PX RECEIVE | | 1 | 10 | | 2 (0)| | | Q1,04 | PCWP | |
| 10 | PX SEND BROADCAST | :TQ10000 | 1 | 10 | | 2 (0)| | | | S->P | BROADCAST |
|* 11 | TABLE ACCESS FULL | PS_SCB_BUS_UNIT | 1 | 10 | | 2 (0)| | | | | |
| 12 | TABLE ACCESS BY LOCAL INDEX ROWID| PS_FI_INSTR_F00 | 1 | 42 | | 1 (0)| | | Q1,04 | PCWC | |
| 13 | NESTED LOOPS | | 1954 | 362K| | 4271 (2)| | | Q1,04 | PCWP | |
|* 14 | HASH JOIN | | 1954 | 282K| | 3999 (2)| | | Q1,04 | PCWP | |
| 15 | BUFFER SORT | | | | | | | | Q1,04 | PCWC | |
| 16 | PX RECEIVE | | 1 | 10 | | 2 (0)| | | Q1,04 | PCWP | |
| 17 | PX SEND BROADCAST | :TQ10001 | 1 | 10 | | 2 (0)| | | | S->P | BROADCAST |
PLAN_TABLE_OUTPUT
|* 18 | TABLE ACCESS FULL | PS_SCB_BUS_UNIT | 1 | 10 | | 2 (0)| | | | | |
|* 19 | HASH JOIN | | 3907 | 526K| | 3997 (2)| | | Q1,04 | PCWP | |
| 20 | PX RECEIVE | | 54702 | 4700K| | 616 (1)| | | Q1,04 | PCWP | |
| 21 | PX SEND HASH | :TQ10003 | 54702 | 4700K| | 616 (1)| | | Q1,03 | P->P | HASH |
| 22 | PX BLOCK ITERATOR | | 54702 | 4700K| | 616 (1)| 1 | 6119 | Q1,03 | PCWC | |
|* 23 | TABLE ACCESS FULL | PS_FI_ILDGR_F00 | 54702 | 4700K| | 616 (1)| 1 | 6119 | Q1,03 | PCWP | |
| 24 | BUFFER SORT | | | | | | | | Q1,04 | PCWC | |
| 25 | PX RECEIVE | | 221K| 10M| | 3380 (3)| | | Q1,04 | PCWP | |
| 26 | PX SEND HASH | :TQ10002 | 221K| 10M| | 3380 (3)| | | | S->P | HASH |
| 27 | NESTED LOOPS | | 221K| 10M| | 3380 (3)| | | | | |
| 28 | NESTED LOOPS | | 1 | 16 | | 2351 (2)| | | | | |
PLAN_TABLE_OUTPUT
| 29 | VIEW | | 1 | 6 | | 2349 (2)| | | | | |
|* 30 | COUNT STOPKEY | | | | | | | | | | |
| 31 | PARTITION LIST SINGLE | | 661K| 7755K| | 2349 (2)| KEY | KEY | | | |
| 32 | TABLE ACCESS FULL | STG_FTP_TRANS_BAL_TB | 661K| 7755K| | 2349 (2)| 2 | 2 | | | |
|* 33 | TABLE ACCESS FULL | PS_SCB_BUS_UNIT | 1 | 10 | | 2 (0)| | | | | |
| 34 | PARTITION LIST ITERATOR | | 442K| 14M| | 1029 (3)| KEY | KEY | | | |
|* 35 | TABLE ACCESS FULL | PS_FI_IOTHER_R00 | 442K| 14M| | 1029 (3)| KEY | KEY | | | |
| 36 | PARTITION LIST ITERATOR | | 1 | | | 1 (0)| KEY | KEY | Q1,04 | PCWP | |
|* 37 | INDEX RANGE SCAN | PS_FI_INSTR_F00 | 1 | | | 1 (0)| KEY | KEY | Q1,04 | PCWP | |
| 38 | VIEW | VW_SQ_1 | 5220K| 124M| | 9296 (1)| | | Q1,06 | PCWP | |
| 39 | SORT GROUP BY | | 5220K| 169M| 479M| 9296 (1)| | | Q1,06 | PCWP | |
PLAN_TABLE_OUTPUT
| 40 | PX RECEIVE | | 5220K| 169M| | 9220 (1)| | | Q1,06 | PCWP | |
| 41 | PX SEND HASH | :TQ10005 | 5220K| 169M| | 9220 (1)| | | Q1,05 | P->P | HASH |
| 42 | PX BLOCK ITERATOR | | 5220K| 169M| | 9220 (1)| 1 | 7 | Q1,05 | PCWC | |
| 43 | TABLE ACCESS FULL | PS_FI_INSTR_F00 | 5220K| 169M| | 9220 (1)| 1 | 7 | Q1,05 | PCWP | |
| 44 | SORT AGGREGATE | | 1 | 20 | | | | | | | |
| 45 | PARTITION LIST SINGLE | | 1 | 20 | | 1 (0)| KEY | KEY | | | |
|* 46 | INDEX RANGE SCAN | PS_FI_IOTHER_R00 | 1 | 20 | | 1 (0)| KEY | KEY | | | |
Predicate Information (identified by operation id):
PLAN_TABLE_OUTPUT
1 - filter("C"."ASOF_DT"= (SELECT /*+ */ MAX("C1"."ASOF_DT") FROM "PS_FI_IOTHER_R00" "C1" WHERE "C1"."FI_INSTRUMENT_ID"=:B1 AND
"C1"."BUSINESS_UNIT"=:B2))
4 - access("I"."ASOF_DT"="VW_COL_1" AND "I"."BUSINESS_UNIT"="BUSINESS_UNIT" AND "FI_INSTRUMENT_ID"="I"."FI_INSTRUMENT_ID")
7 - access("I"."BUSINESS_UNIT"="B1"."BUSINESS_UNIT")
11 - filter("B1"."SETID"='PKSTN')
14 - access("A"."BUSINESS_UNIT"="B"."BUSINESS_UNIT")
18 - filter("B"."SETID"='PKSTN')
19 - access("A"."BUSINESS_UNIT"="C"."BUSINESS_UNIT" AND "A"."FI_INSTRUMENT_ID"="C"."FI_INSTRUMENT_ID" AND
"FISCAL_YEAR"=TO_NUMBER(TO_CHAR("UPLOAD_DATE",'YYYY')) AND "ACCOUNTING_PERIOD"=TO_NUMBER(TO_CHAR("UPLOAD_DATE",'MM')))
23 - filter("A"."PF_SCENARIO_ID" LIKE '%M_' AND "A"."ACCOUNT"<>'191801')
PLAN_TABLE_OUTPUT
30 - filter(ROWNUM<2)
33 - filter("B1"."SETID"='PKSTN')
35 - filter("C"."BUSINESS_UNIT"="B1"."BUSINESS_UNIT")
37 - access("A"."BUSINESS_UNIT"="I"."BUSINESS_UNIT" AND "A"."FI_INSTRUMENT_ID"="I"."FI_INSTRUMENT_ID")
46 - access("C1"."BUSINESS_UNIT"=:B1 AND "C1"."FI_INSTRUMENT_ID"=:B2)
Note
- 'PLAN_TABLE' is old version
75 rows selected.

[email protected] wrote:
Following Query running more than 4 hrs. could somone please suggest me to tune this query.1. You can try to avoid self-joins or FILTER operations in the C and D inline views if you change below queries to use analytic functions instead:
(SELECT c.business_unit, c.fi_instrument_id, c.scb_arm_code,
c.scb_tp_product, c.scb_tranche_id, c.scb_bncpr_flg
FROM ps_fi_iother_r00 c, ps_scb_bus_unit b1
WHERE c.business_unit = b1.business_unit
AND b1.setid = 'PKSTN'
AND c.asof_dt =
(SELECT MAX (c1.asof_dt)
FROM ps_fi_iother_r00 c1
WHERE c.business_unit = c1.business_unit
AND c1.fi_instrument_id = c.fi_instrument_id)) c,
(SELECT upload_date - 15 upload_date
FROM stg_ftp_trans_bal_tb
WHERE setid = 'PKSTN' AND ROWNUM < 2),
(SELECT i.business_unit, i.fi_instrument_id, i.pf_system_code,
i.fi_contract_id
FROM ps_fi_instr_f00 i, ps_scb_bus_unit b1
WHERE i.business_unit = b1.business_unit
AND b1.setid = 'PKSTN'
AND (i.asof_dt) =
(SELECT MAX (i1.asof_dt)
FROM ps_fi_instr_f00 i1
WHERE i.business_unit = i1.business_unit
AND i1.fi_instrument_id = i.fi_instrument_id)) d
...Try to use something like this instead:
(select * from
(SELECT c.business_unit, c.fi_instrument_id, c.scb_arm_code,
        c.scb_tp_product, c.scb_tranche_id, c.scb_bncpr_flg,
        rank() over (order by c.asof_dt desc partition by c.business_unit, c.fi_instrument_id) rnk
   FROM ps_fi_iother_r00 c, ps_scb_bus_unit b1
  WHERE c.business_unit = b1.business_unit
    AND b1.setid = 'PKSTN')
where rnk = 1) c,
...2. This piece seems to be questionable since it seems to pick the "UPLOAD_DATE" from an arbitrary row where SETID = 'PKSTN'. I assume that the UPLOAD_DATE is then the same for all these rows, otherwise this would potentially return a different UPLOAD_DATE for each execution of the query. Still it's a questionable approach and seems to be de-normalized data.
(SELECT upload_date - 15 upload_date
FROM stg_ftp_trans_bal_tb
WHERE setid = 'PKSTN' AND ROWNUM < 2),3. Your execution plan contains some parts that are questionable and might lead to inappropriate work performed by the database if the estimates of optimizer are wrong:
a. Are you sure that the filter predicate "SETID"='PKSTN' on PS_SCB_BUS_UNIT returns only a single row? If not, below NESTED LOOP operation could scan the PS_FI_IOTHER_R00 table more than once making this rather inefficient
|  27 |                NESTED LOOPS              |                      |   221K|    10M|       |  3380   (3)|       |       |        |      |            |
|  28 |                 NESTED LOOPS             |                      |     1 |    16 |       |  2351   (2)|       |       |        |      |            |
|  29 |                  VIEW                    |                      |     1 |     6 |       |  2349   (2)|       |       |        |      |            |
|* 30 |                   COUNT STOPKEY          |                      |       |       |       |            |       |       |        |      |            |
|  31 |                    PARTITION LIST SINGLE |                      |   661K|  7755K|       |  2349   (2)|   KEY |   KEY |        |      |            |
|  32 |                     TABLE ACCESS FULL    | STG_FTP_TRANS_BAL_TB |   661K|  7755K|       |  2349   (2)|     2 |     2 |        |      |            |
|* 33 |                  TABLE ACCESS FULL       | PS_SCB_BUS_UNIT      |     1 |    10 |       |     2   (0)|       |       |        |      |            |
|  34 |                 PARTITION LIST ITERATOR  |                      |   442K|    14M|       |  1029   (3)|   KEY |   KEY |        |      |            |
|* 35 |                  TABLE ACCESS FULL       | PS_FI_IOTHER_R00     |   442K|    14M|       |  1029   (3)|   KEY |   KEY |        |      |            |b. The optimizer assumes that below join returns only 3907 rows out of the 54k and 221k source sets. This could be wrong, because the join expression contains multiple function calls and an implicit TO_NUMBER conversion you haven't mentioned in your SQL which is bad practice in general:
19 - access("A"."BUSINESS_UNIT"="C"."BUSINESS_UNIT" AND "A"."FI_INSTRUMENT_ID"="C"."FI_INSTRUMENT_ID" AND
"FISCAL_YEAR"=TO_NUMBER(TO_CHAR("UPLOAD_DATE",'YYYY')) AND "ACCOUNTING_PERIOD"=TO_NUMBER(TO_CHAR("UPLOAD_DATE",'MM')))The conversion functions might hide from the optimizer that the join returns many more rows than estimated, because the optimizer uses default selectivities or guesses for function expressions. If you can't fix the data model to use appropriate join expressions you could try to create function based indexes on the expressions TO_NUMBER(TO_CHAR("UPLOAD_DATE",'YYYY')) and TO_NUMBER(TO_CHAR("UPLOAD_DATE",'MM')) and gather statistics on the corresponding hidden columns (method_opt parameter of DBMS_STATS.GATHER_TABLE_STATS call set to "FOR ALL HIDDEN COLUMNS"). If you're already on 11g you can achieve the same by using virtual columns.
|* 19 |            HASH JOIN                     |                      |  3907 |   526K|       |  3997   (2)|       |       |  Q1,04 | PCWP |            |
|  20 |             PX RECEIVE                   |                      | 54702 |  4700K|       |   616   (1)|       |       |  Q1,04 | PCWP |            |
|  21 |              PX SEND HASH                | :TQ10003             | 54702 |  4700K|       |   616   (1)|       |       |  Q1,03 | P->P | HASH       |
|  22 |               PX BLOCK ITERATOR          |                      | 54702 |  4700K|       |   616   (1)|     1 |  6119 |  Q1,03 | PCWC |            |
|* 23 |                TABLE ACCESS FULL         | PS_FI_ILDGR_F00      | 54702 |  4700K|       |   616   (1)|     1 |  6119 |  Q1,03 | PCWP |            |
|  24 |             BUFFER SORT                  |                      |       |       |       |            |       |       |  Q1,04 | PCWC |            |
|  25 |              PX RECEIVE                  |                      |   221K|    10M|       |  3380   (3)|       |       |  Q1,04 | PCWP |            |
|  26 |               PX SEND HASH               | :TQ10002             |   221K|    10M|       |  3380   (3)|       |       |        | S->P | HASH       |
|  27 |                NESTED LOOPS              |                      |   221K|    10M|       |  3380   (3)|       |       |        |      |            |
|  28 |                 NESTED LOOPS             |                      |     1 |    16 |       |  2351   (2)|       |       |        |      |            |
|  29 |                  VIEW                    |                      |     1 |     6 |       |  2349   (2)|       |       |        |      |            |
|* 30 |                   COUNT STOPKEY          |                      |       |       |       |            |       |       |        |      |            |
|  31 |                    PARTITION LIST SINGLE |                      |   661K|  7755K|       |  2349   (2)|   KEY |   KEY |        |      |            |
|  32 |                     TABLE ACCESS FULL    | STG_FTP_TRANS_BAL_TB |   661K|  7755K|       |  2349   (2)|     2 |     2 |        |      |            |
|* 33 |                  TABLE ACCESS FULL       | PS_SCB_BUS_UNIT      |     1 |    10 |       |     2   (0)|       |       |        |      |            |
|  34 |                 PARTITION LIST ITERATOR  |                      |   442K|    14M|       |  1029   (3)|   KEY |   KEY |        |      |            |
|* 35 |                  TABLE ACCESS FULL       | PS_FI_IOTHER_R00     |   442K|    14M|       |  1029   (3)|   KEY |   KEY |        |      |            |c. Due to the small number of rows estimated, mainly caused by b. above, the result of the joins is broadcasted to all parallel slaves when performing the final join. This might be quite inefficient if the result is much larger than expected.
|   6 |       PX SEND BROADCAST                  | :TQ10004             |   977 |   190K|       |  4273   (2)|       |       |  Q1,04 | P->P | BROADCAST  |Note that this join is not necessary any longer / obsolete if you introduce above analytic functions as suggested.
4. Your PLAN_TABLE does not match your Oracle version. If you're already on 10g or later, simply drop all PLAN_TABLEs in non-SYS schemas since there is already one provided as part of the data dictionary. Otherwise re-create them using $ORACLE_HOME/rdbms/admin/utlxplan.sql
Note
- 'PLAN_TABLE' is old versionIf you want to understand where the majority of the time is spent you need to trace the execution. Note that your statement introduces an increased complexity because it uses parallel execution, therefore you'll end up with multiple trace files per parallel slave and query coordinator process, which makes the analysis not that straightforward.
Please read this HOW TO: Post a SQL statement tuning request - template posting that explains how you can enable the statement trace and what you should provide if you have SQL statement tuning question and how to format it here so that the posted information is readable by others.
This accompanying blog post shows step-by-step instructions how to obtain that information.
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/

Similar Messages

  • Aggregation script is taking long time - need help on optimization

    Hi All,
    Currently we are working to build a BSO solution (version 11.1.2.2) for a customer where we are facing performance issue in aggregating the database. The most common activity of the solution will be to generate data on different scenario from Actual and Budget (Actual Vs Budget difference data in one scenario) and to be used for reporting purpose mainly.
    We are aggregating the data to top level using AGG command for Sparse dimensions. While doing this activity, we found that it is creating a lot of page files and thereby filling up the present physical memory of the drive (to the tune of 70GB). Moreover it is taking a long time to aggregate. The no. of stored members that is present are as follows:
    Dimension - Type - Stored member (Total members)
    Account - Dense- 1597 (1845)
    Period - Dense - 13 (19)
    Year - Sparse - 11 (12)
    Version - Sparse - 2 (2)
    CV - Sparse- 5 (6)
    Scenario - Sparse - 94 (102)
    EV - Sparse - 120 (122)
    FC - Sparse- 118 (121)
    CP - Sparse - 1887 (2049)
    M1 - Sparse - 4873 (4874)
    Entity - Sparse - 12020 (32349) - Includes two alternate hierarchies for rolling up the data
    The other properties are as follows:
    Index Cache - 152000
    Data File Cache - 32768
    Data cache - 153600
    ACR = 0.65
    We are using Buffered I/O
    The level 0 datafile is about 3 GB.( 2 year budget and 1 year 2 months Actuals data)
    Customer is going to use SmartView to retrieve the data and having Planning Plus License only. So could not go for an ASO solution. We could not reduce the members of huge Sparse dimensions M1 and CP as well. To improve the data retrieval time, we had to make upper level members as stored which resolved data retrieval issue
    I am seeking for help on the following:
    1. How can we optimize the time taken? Currently each dimension is taking about an hour to aggregate. Calc Dim is taking even longer time. Hence opted for AGG
    2. Will change of dense and sparse setting help our cause? ACR is ona lower side. Please note that most calculations are either on Period dimensions or FC. There is no such calculation on Account dimension
    3. Will change of a few non-level 0 members from store to dynamic-calc help? Will this slow down calculations in the cube?
    4. What should be the best performance order for this cube?
    Appreciate your help in these regard,
    Regards,
    Sukhamoy

    Please provide following  information
    1)  Block size  and other statistic
    2)  Aggreagation script
    >>Index Cache - 152000
    >>Data File Cache - 32768
    >>Data cache - 153600
    Try this settings
    Index Cache - 1120000
    Data cache - 3153600

  • Is index range scan the reason for query running long time

    I would like to know whether index range scan is the reason for the query running long time. Below is the explain plan. If so, how to optimise it? Please help
    Operation     Object     COST     CARDINALITY     BYTES
    SELECT STATEMENT ()          413     1000     265000
    COUNT (STOPKEY)                    
    FILTER ()                    
    TABLE ACCESS (BY INDEX ROWID)     ORDERS     413     58720     15560800
    INDEX (RANGE SCAN)     IDX_SERV_PROV_ID     13     411709     
    TABLE ACCESS (BY INDEX ROWID)     ADDRESSES     2     1     14
    INDEX (UNIQUE SCAN)     SYS_C004605     1     1     
    TABLE ACCESS (BY INDEX ROWID)     ADDRESSES     2     1     14
    INDEX (UNIQUE SCAN)     SYS_C004605     1     1     
    TABLE ACCESS (BY INDEX ROWID)     ADDRESSES     2     1     14
    INDEX (UNIQUE SCAN)     SYS_C004605     1     1

    The index range scan means that the optimiser has determined that it is better to read the index rather than perform a full table scan. So in answer to your question - quite possibly but the alternative might take even longer!
    The best thing to do is to review your query and check that you need every table included in the query and that you are accessing the tables via the best route. For example if you can access a table via primary key index that would be better than using a non-unique index. But the best way of reducing the time the query takes to run is to give it less tables (and indexes) to read.
    John Seaman
    http://www.asktheoracle.net

  • Select query running long time

    Hi,
    DB version : 10g
    platform : sunos
    My select sql query running long time (more than 20hrs) .Still running .
    Is there any way to find sql query completion time approximately. (Pending time)
    Also is there any possibilities to increase the speed of sql query (already running) like adding hints.
    Please help me on this .
    Thanks

    Hi Sathish thanks for your reply,
    I have already checked in V$SESSION_LONGOPS .But it's showing TIME_REMAINING -->0
    select TOTALWORK,SOFAR,START_TIME,TIME_REMAINING from V$SESSION_LONGOPS where SID='10'
    TOTALWORK      SOFAR START_TIME      TIME_REMAINING
         1099759    1099759 27-JAN-11                    0Any idea ?
    Thanks.

  • Firefox will not open after installation. i have tried to install several times with the same results. installation sends a list to firefox each time. need help. willard lee

    will not open after installation. i have tried to install several times with the same results. installation sends a list to firefox each time. need help. willard lee

    Can you attach a screenshot or link to the instructions you are following?
    You are on the 3.6 release and Firefox 7.0.1 is out. You can download and install the latest release from http://www.mozilla.org/en-US/firefox/new/ if you would like to update now. The 3.6 version will be maintained for a while longer, but you should update when you can.

  • I have Iconia Tab A500, running 3.0, need help updating using microsd card, got Acer update download

    I have Iconia Tab A500 running 3.0, need help updating, I downloaded all updaes list in the acer supprt, all versions, 3.0, 3.1, 3.2, and 4.something, I read on the acer support somewhere I can use a microsd card to update my device, because acer no longer provides automatically, when i try it says "poor network connection, move to anthoer location.", Do I need to update all the listed updates, or can i only update, using the 4. 0? to get the last known update. I also downloaded, "Documents, Apllications, Drivers, Patches, and O.S..... How do i intsall all these updates, I think am running the very lowest version available, Please Help me... Thank you in advance.

    the update listed on the acer website, that mentions the a500 update is 'kernal source code (for Android 4.0 Ice Cream Sandwich) it's 96.7MB's released 2012/05/08' is that the right one i need? There is also a list of 3 O.S updates, released in 2014/09/05, 391.5MB's, 394.3MB's, and 391.5MB's large, what are those updates, I clicked the model and followed the directions that the acer website asks, and i ended with a list of update released in 2014/09/05, and a Document update released in 2014/12/17, 112.7KB's large,  list of updates reased in 2014/.... and in the Android 4.0 culumn, there is an update that says O.S update released in 2014/09/05, 434.2MB's large, and a Patch Update, that was released in 2013/03/21, what are these updates? listedin the aver website... http://www.acer.ca/ac/en/CA/content/drivers 

  • Can't find a playlist I created on my playlist or computer? I didn't delete it. I don't want to create it again because it took a long time. please help me find and recover.

    Can't find a playlist I created on my playlist or computer? I didn't delete it. I don't want to create it again because it took a long time. please help me find and recover.

    Playlists only exist as part of the larger iTunes library listing so if you are not seeing it there it doesn't exist anywhere else.  I know with my older version of iTunes it is very easy to accidentally delete a playlist.  With newer versions it may be possible to recover it with the undo feature in the menu but this likely will only work immediately after the deletion.

  • Background Job  running long time.

    Hello All,
    One of customer background job running for long time more than 11 hours, but usually this jobs get completed within 4 hrs.
    I have checked in WP trace file, it shows "WP has reached abap/heaplimit=40000000".
    This is the Value I can see in RZ11. Now it is not possible to change the value.
    Frequently facing this problem, please guide me to solve this issue.
    Regards
    Vinay.

    Hi
    First of all, abap/heaplimit is the limit of memory usage by a WP.
    Follwing is the documentation from help.sap.com
    The value of the parameter should be between 10000000 (10 MB) and 2000000000 (2GB), the recommended default setting is 40000000 (40 MB).
    The objective is to have the least number of work process restarts as possible, without a swap space bottleneck occurring.  The heap memory allocated by the work processes has to be released again.
    As shown in the graphic, the value of abap/heaplimit should be smaller than abap/heap_area_dia or abap/heap_area_nondia, so that the dialog step that is running can still be executed. This prevents the work process from working against the operating systemu2019s swap space limit if there is a programmed termination of the work process.
    So,Do the above checks. And importantly check the memory utilizations at the time of running your job and check whether any other job was also running at the sametime.
    Increasing the parametes is not a good idea.. If you continuously face this issue then only think of parametes. As u said ,this problem is not happenng too often.
    Hope this is useful

  • Query running longer time

    Hi All,
    when i run the query in Analyzer,it is taking longer time.the query is built on DSO.
    can anyone give me inputs why the query is taking much time
    Thanks in Advance
    Reddy

    Hi,
    Follow this thread to find out how to improve Query performance on ODS.
    ODS Query Performance  
    Achieving BI Query Performance Building Business Intelligence
    http://www.dmreview.com/issues/20051001/1038109-1.html
    Hope this helps.
    Thanks,
    JituK

  • FIM Reporting initial sync running long time

    We have installed FIM Reporting last month , afterwards our FIM reporting initial sync powershell script is running from last month to Sync FIM data with SCSM server , but still only half data is synced with SCSM server ,
    we have 4 server
    1. Server1 --FIM server
    2. Server2 -- FIM database
    2. Server3 -- SCSM service manager  and SQL server Databases for Service manager and Data warehouse
    4. Server4 -- Data warehouse server
    As FIM initial sync script is taking long time to sync so we found some errors in Server 4 (Data warehouse server) multiple times during ETL jobs running.
    Error screen shot
    Please give some suggestions to make FIM initial sync faster

    Please try Resume-FIMReportingInitialSync instead of starting initial sync once again.
    Sadly Initial Sync is very long and even on test environments it can take a long time.
    But it seems that data from FIM was successfully moved to reporting database, but it hasn't been calculated by Service Manager correctly between its databases. 
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • Wait time/need help

    Hi
    need help
    II used wait time function to wait 5 second before send command to my device , I put this function in while loop so I could display the waiting time until it is reach 5 seconds , it is work in the first run but when I run the VI for the second time it is give me all waiting time , I want it to start from 0 for each run

    I'm glad you solved the problem...
    However, I'm trying to figure out what it is that you are trying to accomplish.
    Why do you make the buttons visible?  Were they made invisible somewhere else?
    Why do you use the property node to assign names to the cancel, and ok buttons?  Were they renamed elsewhere?
    Which VI / subvi are you opening the front panel?  If it is the one I am looking at, you can set that up in the VI Properties, within the Window Appearance section, and select Custom. You can set it to "Show front panel when called" and "Close afterwards if originally closed".
    You can simplify your Rube Goldberg boolean logic by wiring the Cancel and the output of both OK buttons (ORed) to the Compound Arithmetic function (OR).
    To learn more about LabVIEW, I suggest you try looking at some of these tutorials.

  • DTP running long time to load master data due to lock on SID table

    Hi,
    we are facing a problem while DTP loading master data into targets(Info Objects).
    It is taking long time to load data due to below error.
    18.03.2014 01:03:23 All records forwarded                                                                             RSM2          730          S
    18.03.2014 01:13:39 EXTRACTION OF DATAPACKAGE 000009                                                                  RSAR          051          S
    18.03.2014 01:13:40 All records forwarded                                                                             RSM2          730          S
    18.03.2014 01:24:50 EXTRACTION OF DATAPACKAGE 000010                                                                  RSAR          051          S
    18.03.2014 01:24:51 All records forwarded                                                                             RSM2          730          S
    18.03.2014 01:38:34 EXTRACTION OF DATAPACKAGE 000011                                                                  RSAR          051          S
    18.03.2014 01:38:41 All records forwarded                                                                             RSM2          730          S
    18.03.2014 01:52:10 EXTRACTION OF DATAPACKAGE 000012                                                                  RSAR          051          S
    18.03.2014 01:52:10 All records forwarded                                                                             RSM2          730          S
    18.03.2014 02:06:51 EXTRACTION OF DATAPACKAGE 000013                                                                  RSAR          051          S
    18.03.2014 02:06:53 All records forwarded                                                                             RSM2          730          S
    18.03.2014 02:22:32 EXTRACTION OF DATAPACKAGE 000014                                                                  RSAR          051          S
    18.03.2014 02:22:33 All records forwarded                                                                             RSM2          730          S
    18.03.2014 02:38:36 EXTRACTION OF DATAPACKAGE 000015                                                                  RSAR          051          S
    18.03.2014 02:38:37 All records forwarded                                                                             RSM2          730          S
    18.03.2014 02:55:25 EXTRACTION OF DATAPACKAGE 000016                                                                  RSAR          051          S
    18.03.2014 02:55:25 All records forwarded                                                                             RSM2          730          S
    18.03.2014 03:13:56 SQL: 18.03.2014 03:13:56 ALEREMOTE                                                                DBMAN         099          I
    18.03.2014 03:13:56 TRUNCATE TABLE "/BI0/0600000066"                                                                  DBMAN         099          I
    18.03.2014 03:13:56 SQL-END: 18.03.2014 03:13:56 00:00:00                                                             DBMAN         099          I
    18.03.2014 03:13:56 SQL: 18.03.2014 03:13:56 ALEREMOTE                                                                DBMAN         099          I
    18.03.2014 03:13:56  LOCK TABLE "/BI0/0600000066" IN EXCLUSIVE MODE                                                   DBMAN         099          I
    18.03.2014 03:13:56 NOWAI                                                                                             DBMAN         099          I
    18.03.2014 03:13:56 SQL-END: 18.03.2014 03:13:56 00:00:00                                                             DBMAN         099          I
    18.03.2014 03:13:58 EXTRACTION OF DATAPACKAGE 000017                                                                  RSAR          051          S
    18.03.2014 03:13:59 All records forwarded                                                                             RSM2          730          S
    18.03.2014 03:34:24 EXTRACTION OF DATAPACKAGE 000018                                                                  RSAR          051          S
    18.03.2014 03:34:25 All records forwarded                                                                             RSM2          730          S
    18.03.2014 03:56:03 EXTRACTION OF DATAPACKAGE 000019                                                                  RSAR          051          S
    18.03.2014 03:56:03 All records forwarded                                                                             RSM2          730          S
    18.03.2014 04:19:55 EXTRACTION OF DATAPACKAGE 000020                                                                  RSAR          051          S
    18.03.2014 04:19:56 All records forwarded                                                                             RSM2          730          S
    18.03.2014 04:44:07 SQL: 18.03.2014 04:44:07 ALEREMOTE                                                                DBMAN         099          I
    18.03.2014 04:44:07 TRUNCATE TABLE "/BI0/0600000068"                                                                  DBMAN         099          I
    18.03.2014 04:44:09 SQL-END: 18.03.2014 04:44:09 00:00:02                                                             DBMAN         099          I
    18.03.2014 04:44:09 SQL: 18.03.2014 04:44:09 ALEREMOTE                                                                DBMAN         099          I
    18.03.2014 04:44:09  LOCK TABLE "/BI0/0600000068" IN EXCLUSIVE MODE                                                   DBMAN         099          I
    18.03.2014 04:44:09 NOWAI                                                                                             DBMAN         099          I
    18.03.2014 04:44:09 SQL-END: 18.03.2014 04:44:09 00:00:00                                                             DBMAN         099          I
    18.03.2014 04:44:12 EXTRACTION OF DATAPACKAGE 000021                                                                  RSAR          051          S
    18.03.2014 04:44:13 All records forwarded                                                                             RSM2          730          S
    For this long running data load we didnt find any short dumps and no locks available on SM12 also.
    Please help on this.
    Thanks,
    Sankar.

    Can we know what kind of data source is this. attribute or text data source.
    what is data volume? its less or more?
    Actually we load direct access data thru dtp(No psa) into info objects for text data sources where have less data only.
    While running your dtp is any attribute change run for the same info object ot any transactional loads are happening?
    Is this happens on particular day or weekend or anydays?
    Thanks

  • Process chain running long time

    Hi all..
    I have one process chain.that chain haveing very small data.when iam created time it runs nearly 20 to 30 mints.
    Now the same chain running nearly 3 hours..
    Why its taking very long time?How to reduce the chain running time.Any steps to reduce the chain running time..
    Thanks
    Ramya

    Hi,
    Check the load in the chain which is taking long time.
    Check out how much data is that load uploading.
    Regards,
    Rohini

  • Ebay states "This Connection Is Untrusted" and has done for a long time - please help me use ebay again!

    For a long time now, every time I've tried to log in to ebay (I can get into ebay, but I cannot log into my account, etc) or Paypal (I cannot even access this site), I get an error message stating that "the connection is untrusted" "You have asked Firefox to connect securely to signin.ebay.com, but we can't confirm that your connection is secure".- I've tried the standard solution i.e. resetting the time and date on my computer, but still this does not work.
    Please help as this is severely restricting the use on my computer - and it's frustrating as hell!
    Many thanks

    Try to rename the cert8.db file in the Firefox profile folder to cert8.db.old or delete the cert8.db file to remove intermediate certificates that Firefox has stored.
    If that helped to solve the problem then you can remove the renamed cert8.db.old file.<br />
    Otherwise you can rename (or copy) the cert8.db.old file to cert8.db to restore the previous intermediate certificates.<br />
    Firefox will automatically store intermediate certificates when you visit websites that send such a certificate.
    If that didn't help then remove or rename secmod.db (secmod.db.old) as well.
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox

  • Query running long time

    hi
    I'm having a query running for long time, Im new to dba can any one suggest me methods to make it faster it's running now and i have to make it execute it faster
    parallel servers=4, and there are no inactive sessions.
    thanks in advance

    Make a habit of putting the database version in the post
    As i told u before i depends on lot of things not only merge(cartisian ) joins,
    1)It depends on the load the database is having,Was this query running fastly before?if it was running fastly then was the workload same as today?
    2)Any changes done to database recently or the server?
    3)only this query is slow all the queris are slow?
    4)When was database last restarted?
    5)Are u using bind variable in the query?
    6)Is you library cache properly sized?If the query is doing lots of sorts then is your PGA properly sized?
    7)Database buffer cache is properly sized?
    8)How much memory your database is having?
    9)Is your SGA properly fits in your memory or its getting swaped?
    Etc...Etc
    Check all these things
    Regards
    Kaunain

Maybe you are looking for