QUREY PERFORMANCE, PLEASE HELP

Hi, I have written a query which is you can see below. The query qpproximately takes 50- 60 SEC to run, which I believe is way too high. The total rows returned is 10,000 . Any idead/lead what to do to improve the query timings ? The number of rows in each table are as follows :
ACCOUNTS : 1,580
PERSONNEL : 1,616
DIVISION : 15
LABOR_COMMITTED : 23,000
FISCAL_SYSTEM_PERIODS : 20
FISCAL_YEARS : 20
INDEXES :
ACCOUNTS TABLE- 1. ACCOUNT_ID ( Primary Key), 2. IN_AC_COMBINED(ACCOUNT_ID , ACCOUNT_MANAGER)
LABOR_COMMITTED TABLE- 1.LABOR_COMMIT_ID ( Primary Key) 2. IN_LC_COMBINED(PERSONNEL_ID, ACCOUNT_ID)
PERSONNEL TABLE- 1. PERSONNEL_ID ( Primary key)
The Actual Query :
SELECT AC.ACCOUNT_NUMBER , AC.ACCOUNT_NAME , AC.ACCOUNT_END_DATE ,
P1.NAME , D.DIVISION_NUMBER , P.SURNAME_ISI || ' '|| P.FIRST_NAME Person_Name,
ISNULL(P.EMPLOYEE_ID,P.VISITOR_NUMBER) Employee_Number, CONVERT(DATETIME ,
FSP.FISCAL_SYSTEM_PERIOD_CAL_YR_EQ || ' ' || FY.FISCAL_YEAR) Month_Year ,
FSP.FISCAL_SYSTEM_PERIOD_CAL_YR_EQ || ' ' || FY.FISCAL_YEAR Month_Year1,
ROUND(LC.LCS_EFFORT,2) LCS_Effort , 'ACTUAL' AS 'Labor Type' ,
(SELECT CODE_VALUE FROM CODES CD WHERE CODE_ID = P.STAFF_CATEGORY_CODE_ID) STAFF_CAT
FROM ACCOUNTS AC, PERSONNEL P1 ,DIVISIONS D, LABOR_COMMITED LC , PERSONNEL P , FISCAL_SYSTEM_PERIODS FSP , FISCAL_YEARS FY
WHERE P1.PERSONNEL_ID IN (SELECT DISTINCT CHILD.PERSONNEL_ID FROM PERSONNEL CHILD, PERSONNEL PARENT WHERE PARENT.PERSONNEL_ID IN (7167,7041)
AND CHILD.LFT BETWEEN PARENT.LFT AND PARENT.RGT AND PARENT.LFT <> 0 AND PARENT.RGT <> 0)
AND AC.ACCOUNT_MANAGER = P1.PERSONNEL_ID AND P1.DIVISION_ID = D.DIVISION_ID AND AC.ACCOUNT_ID = LC.ACCOUNT_ID
AND LC.PERSONNEL_ID = P.PERSONNEL_ID AND FSP.FISCAL_SYSTEM_PERIOD_ID = LC.FISCAL_PERIOD_ID AND FY.FISCAL_YEAR_ID = LC.FISCAL_YEAR_ID
AND LC.COMMITED_DATE IS NOT NULL AND TO_DATE(FISCAL_SYSTEM_PERIOD_CAL_YR_EQ || ' ' || FISCAL_YEAR) <= TO_DATE(DATETIME,'01-Jan-2007')
AND TO_DATE(FISCAL_SYSTEM_PERIOD_CAL_YR_EQ || ' ' || FISCAL_YEAR) >= CONVERT(DATETIME,'01-Feb-2006')

<pre>
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | | | |
| 1 | MERGE JOIN | | | | |
| 2 | SORT JOIN | | | | |
| 3 | NESTED LOOPS | | | | |
| 4 | NESTED LOOPS | | | | |
| 5 | NESTED LOOPS | | | | |
| 6 | NESTED LOOPS | | | | |
PLAN_TABLE_OUTPUT
| 7 | NESTED LOOPS | | | | |
| 8 | NESTED LOOPS | | | | |
| 9 | TABLE ACCESS FULL | FISCAL_YEARS | | | |
|* 10 | TABLE ACCESS BY INDEX ROWID| LABOR_COMMITED | | | |
|* 11 | INDEX RANGE SCAN | IN_LC_PERIOD | | | |
|* 12 | TABLE ACCESS BY INDEX ROWID | FISCAL_SYSTEM_PERIODS | | | |
|* 13 | INDEX UNIQUE SCAN | FISCAL_SYS_PK | | | |
| 14 | TABLE ACCESS BY INDEX ROWID | PERSONNEL | | | |
|* 15 | INDEX UNIQUE SCAN | PK_PERSONNEL_ID | | | |
| 16 | TABLE ACCESS BY INDEX ROWID | ACCOUNTS | | | |
|* 17 | INDEX UNIQUE SCAN | PK_ACCOUNT_ID | | | |
PLAN_TABLE_OUTPUT
| 18 | TABLE ACCESS BY INDEX ROWID | PERSONNEL | | | |
|* 19 | INDEX UNIQUE SCAN | PK_PERSONNEL_ID | | | |
| 20 | TABLE ACCESS BY INDEX ROWID | DIVISIONS | | | |
|* 21 | INDEX UNIQUE SCAN | DIVISION_ID_PK | | | |
|* 22 | SORT JOIN | | | | |
| 23 | VIEW | VW_NSO_1 | | | |
| 24 | SORT UNIQUE | | | | |
| 25 | CONCATENATION | | | | |
| 26 | NESTED LOOPS | | | | |
|* 27 | TABLE ACCESS BY INDEX ROWID | PERSONNEL | | | |
|* 28 | INDEX UNIQUE SCAN | PK_PERSONNEL_ID | | | |
PLAN_TABLE_OUTPUT
| 29 | TABLE ACCESS BY INDEX ROWID | PERSONNEL | | | |
|* 30 | INDEX RANGE SCAN | PERSONNEL_TREE | | | |
| 31 | NESTED LOOPS | | | | |
|* 32 | TABLE ACCESS BY INDEX ROWID | PERSONNEL | | | |
|* 33 | INDEX UNIQUE SCAN | PK_PERSONNEL_ID | | | |
| 34 | TABLE ACCESS BY INDEX ROWID | PERSONNEL | | | |
|* 35 | INDEX RANGE SCAN | PERSONNEL_TREE | | | |
Predicate Information (identified by operation id):
PLAN_TABLE_OUTPUT
10 - filter("LC"."COMMITED_DATE" IS NOT NULL)
11 - access("FY"."FISCAL_YEAR_ID"="LC"."FISCAL_YEAR_ID")
12 - filter(TO_DATE('01-'||"FSP"."FISCAL_SYSTEM_PERIOD_CAL_YR_EQ"||'-'||"FY"."FISCAL_YEAR
")>=TO_DATE('01-Feb-2006') AND TO_DATE('01-'||"FSP"."FISCAL_SYSTEM_PERIOD_CAL
_YR_EQ"||'-'||"FY"."FISCAL_YEAR")<=TO_DATE('01-Jan-2007'))
13 - access("FSP"."FISCAL_SYSTEM_PERIOD_ID"="LC"."FISCAL_PERIOD_ID")
15 - access("LC"."PERSONNEL_ID"="SYS_ALIAS_1"."PERSONNEL_ID")
17 - access("AC"."ACCOUNT_ID"="LC"."ACCOUNT_ID")
19 - access("AC"."ACCOUNT_MANAGER"="P1"."PERSONNEL_ID")
21 - access("P1"."DIVISION_ID"="D"."DIVISION_ID")
PLAN_TABLE_OUTPUT
22 - access("P1"."PERSONNEL_ID"="VW_NSO_1"."$nso_col_1")
filter("P1"."PERSONNEL_ID"="VW_NSO_1"."$nso_col_1")
27 - filter("PARENT"."RGT"<>0 AND "PARENT"."LFT"<>0)
28 - access("PARENT"."PERSONNEL_ID"=7041)
30 - access("CHILD"."LFT">="PARENT"."LFT" AND "CHILD"."LFT"<="PARENT"."RGT")
32 - filter("PARENT"."RGT"<>0 AND "PARENT"."LFT"<>0)
33 - access("PARENT"."PERSONNEL_ID"=7167)
35 - access("CHILD"."LFT">="PARENT"."LFT" AND "CHILD"."LFT"<="PARENT"."RGT")
</pre>

Similar Messages

  • Query Performance Please Help

    Hi can any body tell me how do I improve the performance of this query.This query takes forever to execute.
    PLEASE HELP
    select substr(d.name,1,14) "dist",
    sum(r.room_net_sq_foot) "nsf",
    sum(r.student_station_count) "sta",
    sum(distinct(r.cofte)) "fte"
    from b_fish_report r,
    g_efis_organization d
    where substr(r.organization_code,-2,2) = substr(d.code,-2,2) and
    d.organization_type = 'CNTY' and
    r.room_satisfactory_flag = 'Y' and
    substr(d.code,-2,2) between '01' and '72'
    -- rownum < 50
    group by d.name, r.organization_code
    order by d.name
    It has nonunique Indexes on Organization code
    Thanks
    Asma.

    Asma,
    I tried your SQL on my tables T1 and T2. Indexes are on C1,C2,C3 and N1,N2,N3. The data in T1 and T2 are shown below with the explain plan (also called EP) listed. You really need to do an explain plan (free TOAD is easiest to do this in) and respond showing your EP results.
    By simply changing the optimizer mode to RULE I was able to get it to use indexes on both T1 and T2.
    T1 data
    C1     C2     C3     N1     N2
    001     Y     AAA     1     11
    002     Y     BBB     2     22
    003     Y     CCC     3     33
    111     N     DDD     4     44
    222     N     EEE     5     55
    333     Y     FFF     6     66
    070     Y     GGG     7     77
    071     N     HHH     8     88
    072     Y     III     9     99
    TEST     TEST     TEST     10     100
    T2 data
    C1     C2     C3     N1     N2
    001     CNTY     AAA     1     11
    002     CNTY     BBB     2     22
    003     CNTY     CCC     3     33
    111     XXX     DDD     4     44
    222     XXX     EEE     5     55
    333     CNTY     FFF     6     66
    070     CNTY     GGG     7     77
    071     XXX     HHH     8     88
    072     CNTY     III     9     99
    TEST     TEST     TEST     10     100
    This is the results when I run the SQL based on this data ...
    dist     nsf     sta     fte
    AAA     1     11     10
    BBB     2     22     20
    CCC     3     33     30
    FFF     6     66     60
    GGG     7     77     70
    III     9     99     90
    --[SQL 1] : with CHOOSE as the optimizer mode, which is normally the DEFAULT if no hint is specified
    select /*+ CHOOSE */
    substr(d.c3,1,14) "dist",
    sum(r.n1) "nsf",
    sum(r.n2) "sta",
    sum(distinct(r.n3)) "fte"
    from t1 r, t2 d
    where substr(r.c1,-2,2) = substr(d.c1,-2,2) and
    d.c2 = 'CNTY' and
    r.c2 = 'Y' and
    substr(d.c1,-2,2) between '01' and '72'
    group by d.c3, r.c1
    order by d.c3
    This is what the EP shows for your SQL (which will probably be the same for you once you do an EP on your actuall sql) ...
    SELECT STATEMENT Optimizer=CHOOSE (Cost=4 Card=1 Bytes=37)
    SORT (GROUP BY) (Cost=4 Card=1 Bytes=37)
    NESTED LOOPS (Cost=2 Card=1 Bytes=37)
    TABLE ACCESS (FULL) OF T1 (Cost=1 Card=1 Bytes=12)
    TABLE ACCESS (BY INDEX ROWID) OF T2 (Cost=1 Card=1 Bytes=25)
    INDEX (RANGE SCAN) OF I_NU_T2_C2 (NON-UNIQUE)
    Notice the FULL table scan of T1 which you don't want, and neither C1 index is getting used (I've explained why below).
    --[SQL 2] : only changed the hint to RULE ...
    select /*+ RULE */
    substr(d.c3,1,14) "dist",
    sum(r.n1) "nsf",
    sum(r.n2) "sta",
    sum(distinct(r.n3)) "fte"
    from t1 r, t2 d
    where substr(r.c1,-2,2) = substr(d.c1,-2,2) and
    d.c2 = 'CNTY' and
    r.c2 = 'Y' and
    substr(d.c1,-2,2) between '01' and '72'
    group by d.c3, r.c1
    order by d.c3
    SELECT STATEMENT Optimizer=HINT: RULE
    SORT (GROUP BY)
    NESTED LOOPS
    TABLE ACCESS (BY INDEX ROWID) OF T2
    INDEX (RANGE SCAN) OF I_NU_T2_C2 (NON-UNIQUE)
    TABLE ACCESS (BY INDEX ROWID) OF T1
    INDEX (RANGE SCAN) OF I_NU_T1_C2 (NON-UNIQUE)
    Though the C2 index is getting used (your r.c2 = 'Y' part in the where clause) the main problem your having here is the JOIN column (C1 in both tables) is not getting used. So the join you have ...
    where substr(r.c1,-2,2) = substr(d.c1,-2,2)
    isn't using an index and you want it too. There are 2 solutions to correct this..
    Solution #1
    The first is to make a function-based index for data. Since your doing SUBSTR on C1 that C1 index does not contain that partial information so it will not use it. Below is the syntax to make a function based index for this partial data ...
    CREATE INDEX I_NU_T1_C1_SUBSTR ON T1 (SUBSTR(C1,-2,2));
    CREATE INDEX I_NU_T2_C1_SUBSTR ON T2 (SUBSTR(C1,-2,2));
    or also this way if it's still not using the above indexes ...
    CREATE INDEX I_NU_T1_C1_SUBSTR ON T1 (SUBSTR(C1,-2,2),C1);
    CREATE INDEX I_NU_T2_C1_SUBSTR ON T2 (SUBSTR(C1,-2,2),C1);
    Solution #2
    The second solution is to make another column in both table and place this 2 digit information in it, and then index this new column. That way the join will look like ...
    where r.c_new_column = d.c_new_column
    and
    r.c_new_column between '01' and '72'
    also with this new column the BETWEEN clause at the end you will not need the substring as well. Also remember BETWEEN on character values is different than numbers.
    Final Notes
    I just tried creating the functional index and I can't get it to be used it for some reason (I might not have the right amount of data), but I really think that is your best option here. As long as it uses the functional index you won't have to change your code. You might want to try using INDEX() in the hint to get it to be used, but hopefully it will use it right away. Try all 4 types of optimizer modes (CHOOSE, RULE, ALL_ROWS, FIRST_ROWS) in your primary hints to see if it will use the new function-based index.
    You really do need to get explain plan going. Even if you make these functional indexes you won't know if its going to be using them until you look at the EP results. You can do EP manually (the SQL of how to produce the results is in OTN, though I find free TOAD is by far the easiest) and you will still need to have run the utlxplan.sql script. Oracle I do think has some GUI tools, maybe in OEM, that have explain plan built in as well.
    I hope this helps ya,
    Tyler D.

  • Aggregates Question (Performance) Please Help

    I have 2 Questions first one is
    <b><i>1. Its been mentioned in the Forum that we can anlyse in the workload Monitor (ST03N) i went through that and did not find any Data for anlysis rather its showing information for Load Analysis.</i></b>
    <i><b>2. Its been mentioned that we also check in RSDDSTAT table contents i checked this table but could not find data (How this table is Populated)</b></i>
    When i checked in
    <b>InfoCube Manage Screen --> Performance --> Check Statistics (Refresh Aggregate Statistics)</b>
    What are these for?
    Can we Analyse to create aggregates or not with out BW Statistics data and just checking ST03N and RSDDSTAT and RSDDAGGRDIR tables?Please Help Me
    I am using BI 7.Points will be assigned (Thanks)
    Message was edited by:
            SV S
    Message was edited by:
            SV S
    null

    Hi,
    For ST03N
    From Document
    BI Administration Cockpit and New BI Statistics Content in SAP NetWeaver 7.0
    As of SAP NetWeaver 7.0 BI, transaction ST03 is based on the Technical Content InfoProviders (unlike prior releases). Therefore, using transaction ST03 for BI Monitoring requires the Technical Content to be activated and to be populated periodically with statistics data.
    So, looks like you have to install the new statistics technical content.
    From thread /message/3461465#3461465 [original link is broken]
    Rajani Saralaya K   
    IN BI 7.0, ST03n is based on BI Statistics cubes, so unless you install these cubes and schedule the dataflow you cant see any result in there. Even the same thing is mentioned in the note 934848.
    For information about RSDDSTAT,
    see /message/3627627#3627627 [original link is broken]
    Raj.

  • Low performance (please help)

    Hi!
    My DB objects are:create or replace TYPE T_G5RPP AS VARRAY(1000) OF NUMBER(2);
    CREATE TABLE "ROGADM"."ROG_TEMP_G5LKL" (
        "ID"     VARCHAR2(100 BYTE),
        "STATUS" NUMBER(2,0) DEFAULT 1,
        "G5IDL"  VARCHAR2(200 BYTE),
        "G5TLOK" NUMBER(1,0),
        "G5PEW"  NUMBER,
        "G5PPP"  NUMBER,
        "G5LIZ"  NUMBER(32,0),
        "G5LPP"  NUMBER(6,0),
        "G5RPP"  "ROGADM"."T_G5RPP",
        "G5WRT"  NUMBER(32,0),
        "G5DWR"  DATE,
        "G5DTW"  DATE,
        "G5DTU"  DATE,
        "ID_G5ADR_RADR" VARCHAR2(100 BYTE),
        "ID_G5JDR_RJDR" VARCHAR2(100 BYTE),
        "ID_G5BUD_RBUD" VARCHAR2(100 BYTE),
        "IDR"           VARCHAR2(100 BYTE),
        "PLS_ID"        NUMBER
    CREATE INDEX "T_G5LKL_ADR_FK" ON "ROG_TEMP_G5LKL" (PLS_ID, "ID_G5ADR_RADR");
    CREATE INDEX "T_G5LKL_BUD_FK" ON "ROG_TEMP_G5LKL" (PLS_ID, "ID_G5BUD_RBUD");
    CREATE INDEX "T_G5LKL_JDR_FK" ON "ROG_TEMP_G5LKL" (PLS_ID, "ID_G5JDR_RJDR");
    create unique index T_G5LKL_PK on ROG_TEMP_G5LKL(PLS_ID, ID);
    function get_obr_ark_dzi(p_obk_typ varchar2, p_obk_id varchar2, p_co varchar2, p_pls_id number)
      return varchar2 deterministic
    AS
      v_obk_typ varchar2(10);
      v_obk_id  G5ADR.ID%type;
      v_out   varchar2(400);
      v_sep   varchar2(2) := '';
      v_old   varchar2(10) := '';
      v_pls_id    number;
    begin
      if p_obk_typ not in ('G5DZE','G5BUD','G5LKL','G5OBR','G5KLU','G5UDZ','G5UDW','G5JDR', 'G5ADR') then
        return null;
      end if;
      v_obk_typ := p_obk_typ;
      v_obk_id  := p_obk_id;
      v_pls_id  := p_pls_id;
      if v_obk_typ = 'G5ADR' then
        -- sprawdzenie, adresem czego jest ten adres
        -- (odczytane będą dane dla adresów działek, budynków lub lokali, które są podpięte do tylko 1 obiektu)
        declare
          v_id  G5LKL.ID%type;
          v_co  varchar2(3);  -- ...jest adresem tego
        begin
          /** START **/
          begin
            v_co := 'LKL';
            execute immediate 'SELECT ID FROM ROG_TEMP_G5LKL WHERE ID_G5ADR_RADR = :obk AND pls_id = :pls'
               into v_id
              using v_obk_id, v_pls_id;
          exception when no_data_found then
            v_co := null;
          end;
          /** END **/
          if v_co is not null then
            v_obk_typ := 'G5'||v_co;
            v_obk_id  := v_id;
          else
            return null;
          end if;
        end;
      end if;
      if v_obk_typ = 'G5LKL' then
        execute immediate
    '   SELECT case when :p_co=''obreb'' then    SUBSTR(G5IDL,10,4)
                    when :p_co=''arkusz'' then   SUBSTR(G5IDL,18,INSTR(G5IDL,''.'',-1,3)-18)
                    when :p_co=''dzialka'' then  SUBSTR(G5IDL,
             instr(G5IDL,''.'',1,2 + case when SUBSTR(G5IDL,15, 3)=''AR_'' then 1 else 0 end) + 1,
             instr(G5IDL,''.'',-1,2)-1 - instr(G5IDL,''.'',1,2 + case when SUBSTR(G5IDL,15, 3)=''AR_'' then 1 else 0 end))
               end
          FROM ROG_TEMP_G5LKL
         WHERE ID = :p_obk_id AND pls_id = :pls' into v_out using p_co,p_co,p_co, v_obk_id, v_pls_id;
      else
        return null;
      end if;
      return v_out;
    exception
      when no_data_found then
        return null;
    end get_obr_ark_dzi;I have a query:SELECT log_pls_id,log_obk_id,
           log_obk_typ
           ,rog_pck_utl.get_obr_ark_dzi(log_obk_typ, log_obk_id, 'obreb', log_pls_id) AS log_obk_obreb
      FROM (SELECT distinct log_obk_id, log_obk_typ, log_pls_id
              FROM rog_log_ksat_zdarzenia
              JOIN rog_log on logkz_log_id = log_id
             WHERE logkz_f_obsluzony <> 'T')
       where log_obk_typ = 'G5ADR' and log_pls_id = 635 and rownum <= 200; which runs 7.2 seconds. When I comment the block bounded by /** START **/ and /** END **/ the query runs only 0.043 seconds.
    Here is part of trace file:SELECT log_pls_id,log_obk_id,
           log_obk_typ
           ,rog_pck_utl.get_obr_ark_dzi(log_obk_typ, log_obk_id, 'obreb', log_pls_id) AS log_obk_obreb
      FROM (SELECT distinct log_obk_id, log_obk_typ, log_pls_id
              FROM rog_log_ksat_zdarzenia
              JOIN rog_log on logkz_log_id = log_id
             WHERE logkz_f_obsluzony <> 'T')
       where log_obk_typ = 'G5ADR' and log_pls_id = 635 and rownum <= 200
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.06       0.10          0       2480          0         200
    total        3      0.06       0.11          0       2480          0         200
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 379  (ROGADM)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          0   COUNT (STOPKEY)
          0    VIEW
          0     SORT (UNIQUE NOSORT)
          0      TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                     'ROG_LOG_KSAT_ZDARZENIA' (TABLE)
          0       NESTED LOOPS
          0        TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                       'ROG_LOG' (TABLE)
          0         INDEX   MODE: ANALYZED (RANGE SCAN) OF 'LOG_I'
                        (INDEX (UNIQUE))
          0        INDEX   MODE: ANALYZED (RANGE SCAN) OF
                       'LOGKZ_LOG_FK_I' (INDEX)
    SELECT ID
    FROM
    ROG_TEMP_G5LKL WHERE ID_G5ADR_RADR = :obk AND pls_id = :pls
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       42      0.00       0.00          0          0          0           0
    Execute     98      0.00       0.00          0          0          0           0
    Fetch       98      7.82       7.58          0    4519564          0           0
    total      238      7.82       7.58          0    4519564          0           0
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 379  (ROGADM)   (recursive depth: 1)
    Rows     Row Source Operation
          0  TABLE ACCESS BY INDEX ROWID ROG_TEMP_G5LKL (cr=138354 pr=0 pw=0 time=231295 us)
    205593   INDEX RANGE SCAN T_G5LKL_PK (cr=576 pr=0 pw=0 time=411229 us)(object id 433034)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          0   TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                  'ROG_TEMP_G5LKL' (TABLE)
    205593    INDEX   MODE: ANALYZED (RANGE SCAN) OF 'T_G5LKL_ADR_FK' (INDEX)
    (...)What do you think is the reason of such big value in 'query' column of 'Fetch'?
    Explain plan executed from SQL Developer is different:explain plan for
    SELECT ID
      FROM ROG_TEMP_G5LKL
    WHERE ID_G5ADR_RADR = :adr
       AND pls_id = 630;
    PLAN_TABLE_OUTPUT
    Plan hash value: 3052821629
    | Id  | Operation                   | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |                |     1 |   117 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS BY INDEX ROWID| ROG_TEMP_G5LKL |     1 |   117 |     3   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | T_G5LKL_PK     |     1 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(ID_G5ADR_RADR=:ADR)
       2 - access(PLS_ID=630)Please help...

    Yes, this index can be unique:SELECT count(*)
      FROM ROG_TEMP_G5LKL
    GROUP BY pls_id, ID_G5ADR_RADR
    HAVING count(*) > 1;
    no rows selectedUnfortunately statistics are not up to date. I can't gather it, because DBA must fix some DB blocks first.
    Edited by: JackK on Aug 5, 2011 7:20 AM
    I've found something! When I add a condition to WHERE clause:SELECT log_pls_id,log_obk_id,
           log_obk_typ
           ,rog_pck_utl.get_obr_ark_dzi(log_obk_typ, log_obk_id, 'obreb', log_pls_id) AS log_obk_obreb
           ,rog_pck_utl.get_obr_ark_dzi(log_obk_typ, log_obk_id, 'arkusz', log_pls_id) AS log_obk_AR
           ,rog_pck_utl.get_obr_ark_dzi(log_obk_typ, log_obk_id, 'dzialka', log_pls_id) AS log_obk_dze
      FROM (SELECT distinct log_obk_id, log_obk_typ, log_pls_id
              FROM rog_log_ksat_zdarzenia
              JOIN rog_log on logkz_log_id = log_id
             WHERE logkz_f_obsluzony <> 'T')
       where log_obk_typ = 'G5ADR' and log_pls_id = 635 and rownum <= 200
         and exists (select 1 from g5lkl where id_g5adr_radr = log_obk_id);   -- added conditionthe statement runs in about 1 second. Without the condition it takes 22.4 seconds to complete. I think that's because in the latter case the querySELECT ID FROM G5LKL ... did not find any row.
    Edited by: JackK on Aug 8, 2011 6:16 AM
    I changed the index T_G5LKL_ADR_FK to:CREATE INDEX T_G5LKL_ADR_FK_ID ON ROG_TEMP_G5LKL (PLS_ID, ID_G5ADR_RADR, ID);and it runs fast enought - *200 rows in 1-2 seconds*. Now the plan shows only INDEX RANGE SCAN.

  • Urgent - Oracle Applications Performance - Please Help me!

    Hi folks!
    I´m having a lot of performance troubles in Oracle applications, and the dba and the network analyst can´t help me. I´m having this trouble since 2 weeks, and nobody can explain why. The system is too slow and if i try a simple select in database it takes a lot of time, i think (i think ok?) there are som database troubles...
    I saw some docs
    1. System Mgmt White Paper http://www.oracle.com/appsnet/technology/managing/collateral/wp_managing11i.pdf
    2. System Mgmt PPT http://www.oracle.com/pls/oow/oow_user.download?p_event_id=15&p_file=P39948.zip
    3. Reducing 11i Downtime PPT http://www.oracle.com/pls/oow/oow_user.download?p_event_id=15&p_file=P39947.zip
    4. Performance and Scalability site : There are a couple of excellent presentations and white papers which will give you the right way to do performance tuning. http://www.oracle.com/appsnet/technology/performance/content.html
    but i need something more specifical like
    simple performance tests.
    Best Regards!
    Filipe
    [email protected]

    Hi
    Check this one.
    http://www.appsworld2004.com/scps/controller/catalog
    Search for item 1066. This is a presentation on "Performance Tuning Users Tips and Techniques" by Ahmed Alomari, Applications Performance Group, Oracle Corporation. You may need to register and then login.
    If you cant access this presentation, let me know, I can mail it to you as well.
    There was a similar presentation of 2002 Appsworld as well. Am not able to locate the link yet.
    Best Wishes
    Vinod Subramanian

  • Tag Performance -- Please Help!!!

    I am using jsp custom tags for internationalization. Syntax is <lib:message key=�key�>
    On one screen, the tag is used many times with various keys in order to get all the text. However, it causes serious performance problem because it seems like a new instance of the tag handler is created for each key. (I can see that by calling hashCode() method)
    For example:
    <lib:message key=�key1�>
    <lib:message key=�key2�>
    on the same page have different hashCode, which means they are two different instances. I am using Jrun 3.1, and I did include the release() method in the tag as follows:
    public void release(){
         key = null;
         super.release();
    Is there any way to use the tag instance pooling for this case?
    I will greatly appreciate your help.
    Jack

    you might want to change the server.xml if you are using tomcat.
    The TagPoolManagaer pools the tag library after their first use
    for further refrence use
    http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#TagPoolManagerInterceptor
    Hope this helps
    Dutta:)

  • I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

  • Lookup transformation - Performance Issue -Please help!

    Hi,
     I have a Source table with 5 million rows. I am pulling all the rows from the source table, then doing the lookup with 5 different tables one by one.
    I use Full cache as the lookup table size is very less only. I used 'Ignore Failure' option in lookup table as I need to do the left join. That means, even if there is NO match, those records also should be passed to the bottom.
     Now, the problem is it is taking a lot of time. To load 1,00,000 records, it is taking 1 hour. The how about 5 Million rows? 50 hours? Could you please help me to find out what is the  mistake i am doing here?

    Is the performance still very poor if you only add for example a row count transformation after your source?
    How many rows are there in the lookup tables? Are you only selecting the columns you need? Is the data type of the selected columns very large?
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • 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

  • Please help for using perform in SAP script

    As subject.
    My sap script code as below:
    /: PERFORM GET_CHAMT_DATE IN PROGRAM ZRAP004
    /:USING    &SPELL-WORD&
    /:CHANGING &SPELL-WORD&
    /:ENDPERFORM
    My program ZRAP004 code as below:
    FORM get_chamt_date USING u_iword TYPE spell-word
                       CHANGING u_oword TYPE spell-word.
    CONCATENATE u_iword '&#20803;&#25972;'(t01) INTO u_oword.
    endform.
    This form is for check printing.
    It's by standard function 'F110' to excute check printing.
    But when i finished this transaction. System return error message as below:
    <b>This routine contains 2 formal parameters, but the current call
    contains 4 actual parameters.</b>
    Please help. Thanks a lot!!

    Hiii
    PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
    /:USING &EKKO-EBELN&
    /:CHANGING &CDECENT&
    /:ENDPERFORM
    The report :
    REPORT zkrpmm_perform_z1medruck .
    DATA : BEGIN OF it_input_table OCCURS 10.
           INCLUDE STRUCTURE itcsy.
    DATA : END OF it_input_table.
    déclaration de la table output_table contenant les
    variables exportées
    DATA : BEGIN OF it_output_table OCCURS 0.
           INCLUDE STRUCTURE itcsy.
    DATA : END OF it_output_table.
    DATA : w_ebeln LIKE ekko-ebeln,
          w_vbeln LIKE vbak-vbeln,
          w_zcdffa LIKE vbak-zcdffa.
    FORM CDE_CENT
    FORM cde_cent TABLES input output.
    it_input_table[] = input[].
    it_output_table[] = output[].
    READ TABLE it_input_table INDEX 1.
    MOVE it_input_table-value TO w_ebeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
               input  = w_ebeln
          IMPORTING
               output = w_ebeln.
    SELECT SINGLE zcdffa FROM ekko
    INTO w_zcdffa
    WHERE ebeln = w_ebeln.
    it_output_table-name = 'CDECENT'.
    MOVE w_zcdffa TO it_output_table-value.
    MODIFY it_output_table INDEX 1.
    output[] = it_output_table[].
    ENDFORM.

  • Please help me how to improve the performance of this query further.

    Hi All,
    Please help me how to improve the performance of this query further.
    Thanks.

    Hi,
    this is not your first SQL tuning request in this community -- you really should learn how to obtain performance diagnostics.
    The information you posted is not nearly enough to even start troubleshooting the query -- you haven't specified elapsed time, I/O, or the actual number of rows the query returns.
    The only piece of information we have is saying that your query executes within a second. If we believe this, then your query doesn't need tuning. If we don't, then we throw it away
    and we're left with nothing.
    Start by reading this blog post: Kyle Hailey &amp;raquo; Power of DISPLAY_CURSOR
    and applying this knowledge to your case.
    Best regards,
      Nikolay

  • Please help!!! Poor performance Neo2...can't figure out why!!

    Hi people,
    I have worked on this issue for days!!  I cannot figure it out!  Here is the problem:
    I used to have a Soltek AND Asus A8V mobo (both via chipsets), and scored approx 12,890 in 3dmark03 and 5,100 in 3dmark05, respectively ON BOTH BOARDS!
    I have swapped out these boards with the msi neo 2 (latest revison) w/ bios 1.4.  I have the SAME other equipment as shown in my signature.
    I only get approx 9,800 in 3dmark03 and 3,889 in 3dmark 05.  Roughly a 2,000/1,000 point lower difference respectively.
    I cannot for the life of me figure out why. I have thought about this for days and searched this and many other forums to no avail.
    I have installed the latest nforce 6.14 driver and the forceware 67.02.  I have tried other drivers as well, using driver cleaner between installs.  Still no go.
    Bios is set at optimized default.  AGP fast writes disabled.  AGP Aperature size 256.  The 6800gt is oc'ed to 400/1100.  No oc on mobo.
    I also did a search and found a review of this board w/ a 3dmark03 bench using the same video card as mine that shows a mark of 15,500 @ resolution 640x480.  
    So I tried the same test @ resolution 640x480 and scored 2,000 less marks.
    I just don't understand this.  Can someone please help and try to shed some light on this for me.  I am SO perplexed about this!!

    Why are you not using the  Soltek or Asus A8V anymore?
    i have almost the same machine as you and i to am very disappointed with the performance of my setup.
    I have also tried other drivers and  installing differecnt OS's (win2k, winXPsp1, winXPsp2), which did not seem to help.  although drivers did make my benchmarks vary depending on dirver and OS.
    I was just about to buy either the soltek 939 pin board or the asus A8V, to see if i can solve my performane issues.
    the only other board that looks really good is the gigabyte GA-K8NSNXP-939, but this board also has an nforce3 chipset and i am begining to think that the nforce3 chipset sux.  
    The only other explanation for the lack of performance or perceived lack of performance is that we are running 64bit CPUs under a 32bit environment  and therefore using only half the power of these CPU's.  

  • Can't use profiler (Performance Analyzer) in Sun Studio 12, please help!!

    Hi,
    I've mandriva 2008 (linux), and I've installed Sun Studio 12.
    At the first start of Sun Studio a message appear:
    Warning - could not install some modules:
         ATD Sun Studio Core - The module named com.sun.tools.swdev.toolscommon was needed and not found.
         dbx Debugger UI - The module named com.sun.tools.swdev.toolscommon was needed and not found.
         ATD Performance Analyzer Actions - The module named com.sun.forte.st.mpmt/1 was needed and not found.
         ATD Performance Analyzer Actions - The module named com.sun.tools.swdev.toolscommon was needed and not found.
    All other modules works correctly, but unfortunately I need the profiler (performance analyzer) because I want to speed up my C++ code. What can I do???
    Please help!
    NOTE:
    I've added to my .bash_profile this lines:
    PATH=/opt/sun/sunstudio12/bin:$PATH
    export PATH
    PATH=/opt/sun/sunstudio12/man/:$PATH
    export PATH
    LD_LIBRARY_PATH=/opt/sun/sunstudio12/prod/lib
    export LD_LIBRARY_PATH
    but unfortunately this don't solve the problem....
    Edited by: MLX82 on Feb 1, 2008 11:24 PM

    If I type `uname -p` this message appear:
    [mlx@localhost ~]$ `uname -p`
    bash: Intel(R): command not foundIf I type: --userdir won't work as you can see:
    sunstudio --userdir /home/mlx/.sunstudio/12.0-Linux-Intel\(R\)\ Pentium\(R\)\ M\ processor\ 1.73GHz/I get an 426 line error (but this is the correct location, as man of sunstudio say), while if I type for example:
    sunstudio --userdir /home/mlx/error 426 disappears, but I get anyway the error on the module:
    Warning - could not install some modules:
         ATD Performance Analyzer Actions - The module named com.sun.forte.st.mpmt/1 was needed and not found.
         ATD Performance Analyzer Actions - The module named com.sun.tools.swdev.toolscommon was needed and not found.
         dbx Debugger UI - The module named com.sun.tools.swdev.toolscommon was needed and not found.
         ATD Sun Studio Core - The module named com.sun.tools.swdev.toolscommon was needed and not found.On the other hand I've searched the "id" exe and it is in /bin:
    [mlx@localhost ~]$ id
    uid=500(mlx) gid=500(mlx) gruppi=500(mlx)so I've created a sym link:
    cd /usr/bin
    ln -s /bin/id ./idbut when I start Sun Studio 12 I get again the error on the module.
    So I've tryed to reinstall everything (yes, also OS) but it (partially) solves only the problem installing with batch_installer. Infact now I can use batch_installer but at the end of installation it say:
    [root@localhost tmp]# ./batch_installer --accept-sla
    Installation failed: cleanup successful.Anyway SunStudio 12 still works, but the main problem about the module of performance analyzer is still here...
    how can I solve this? Please help!
    Edited by: MLX82 on Feb 4, 2008 3:19 PM

  • Slow performance after iOS 7.1 upgrade, please help.

    My kids have iPad Airs.  One of them has a serious slow down in performance after upgrading to iOS 7.1.  The others work fine.  It is so slow that it is unusable.  When you type a single character, it takes several seconds to show up on the screen.  I'm rebooted and did a reset in Settings.  Any other ideas?  Please help.

    I called Apple Support (800-275-2273) and they also recommended a reset: "Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears".
    It came to a screen with a USB cable and arrow to iTunes logo.  I had to connect to my PC and lanuch iTunes.  iTunes recognized the iPad in restore mode.  My only option per Apple Support was to restore to factory defaults.  It appears all data is lost.
    The Apple Support person would not admit that this is a known issue with iOS 7.1 even though you can go online and see that may people have slow performance after upgrading to iOS 7.1.

  • My CS6 photoshop started showing cannot perform function programming error then it started freezing please help?

    My CS6 photoshop started showing {cannot perform function programming error}
    then it started freezing please help?

    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

Maybe you are looking for

  • AuditWorkflowService Not Working Correctly

    Hello, We have been using Record & Playback to record most of our processes and it has recently stopped working correctly.  Processes were no longer going through and forms would hang when trying to open them.  When trying to play process recordings

  • Can.t find employee and other sample tables in oracle 11g express edition

    hi i am new to oracle 11g express edition. I want to run my queries over the employee table, but here i can'nt find this. I use the Select * from tab; it shows no rows selected. Is it present in the 11g or not.

  • Designjet T2500 "Hardware error in scanner"

    OS: Windows 7, 64 bit.  Novell iPrint Client v05.98.00 Our Designjet T2500 keeps displaying the following message: "Hardware error in scanner. Call Hp Support." with what looks to be an error code, 09.10:10. Once restarted (which takes several minute

  • How can I set different musics to different photo presentations?

    With iOS4.3, I could do this easily. Each photo presentation had its own music. With i,OS5,  after watching a presentation, if I choose another one, the music that appears is the one played in the last presentation.

  • Need a solution for my problem. My stuff seems to be gone.

    Hi.  I have an annoying problem which I solution for. When I started my laptop and logged in on my account, (there are two, my account's the administrator) everything on my desktop seemed to be deleted. But when i looked in C:/ it was still there, al