How can i speedup this query ?

Hi,
have a look at this query:
SELECT DISTINCT element_short_description
           FROM sample_test_report, test_group, test_element_master
          WHERE str_test_group_code = tgr_test_group_code
            AND str_element_code = element_code
            AND tgr_group_description = 'SINTER_CHEMICAL_ANALYSIS'
       ORDER BY element_short_descriptionThing is that total number of rows present in "sample_test_report" tables are in lakh ...around 50 lakh.Other two tables have a few rows. This query is taking around 15 seconds for completion, can this query be made faster ?
Note that proper indexing have been done already.
Thanks.

SELECT DISTINCT element_short_description
FROM sample_test_report, test_group, test_element_master
WHERE str_test_group_code = tgr_test_group_code
AND str_element_code = element_code
AND tgr_group_description = 'SINTER_CHEMICAL_ANALYSIS'
ORDER BY element_short_description
Can you provide us with explain plan?
I suggest you use table alias every time:
The alias is specified in the FROM clause after each table name.
Table aliases make your queries more readable.
Then gather statistics your tables:
BEGIN
DBMS_STATS.GATHER_TABLE_STATS('OWNER','TABLE',estimate_percent=>NULL,method_opt=>'FOR ALL INDEXED COLUMNS SIZE AUTO',DEGREE=>10,CASCADE=>TRUE,granularity=>'ALL');
END;
if your db version < 10g
ANALYZE TABLE employees COMPUTE STATISTICS;
ANALYZE TABLE employees ESTIMATE STATISTICS;
If necessary rebuild index, check indexes are use.
Unusable indexes are made valid by rebuilding them to recalculate the pointers.
Rebuilding an unusable index re-creates the index in a new location, and then drops the unusable index. This can be done either by using Enterprise Manager or through SQL commands:
ALTER INDEX HR.emp_empid_pk REBUILD;
ALTER INDEX HR.emp_empid_pk REBUILD ONLINE;
ALTER INDEX HR.email REBUILD TABLESPACE USERS;
Note: Rebuilding an index requires that free space be available for the rebuild. Verify that there is sufficient space before attempting the rebuild. Enterprise Manager checks space requirements automatically.
At the end, try join table separately and then concatenate them.
Your query will be work good.
Look at execution plan, if indexes are not used, use HINTs : There are many Oracle hints available to the developer for use in tuning SQL statements that are embedded in PL/SQL.
please refer to http://www.dba-oracle.com/t_sql_hints_tuning.htm and http://www.adp-gmbh.ch/ora/sql/hints/index.html
Good luck

Similar Messages

  • How can i improve this query.

    Hi guys i am beginner , just wanted to know some info , how can i improve this query ..
    select *
    from tableA A, viewB B,
    where A.key = B.key
    and a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)
    one more thing should function should be on left side of equal sign.
    will a join make it better or something else is needed more than that .

    952936 wrote:
    Hi guys i am beginner , just wanted to know some info , how can i improve this query ..
    select *
    from tableA A, viewB B,
    where A.key = B.key
    and a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)
    one more thing should function should be on left side of equal sign.
    will a join make it better or something else is needed more than that .If you are a beginner try to learn the ANSI Syntax. This will help you a lot to write better queries.
    Your select would look like this in ANSI.
    select *
    from tableA A
    JOIN viewB B ON A.key = B.key
    WHERE a.criteria1 = '111'
    and a.criteria2 = some_function(a.key);The good thing here is that this separates the typical joining part of the select from the typical filter criteria.
    The other syntax very often let you forget one join. Just because there are so many tables and so many filters, that you just don't notice correctly anymore what was join and what not.
    If you notice that the number of column is not what you expect, you can easiely modify the query and compare the results.
    example A
    Remove View B from the query (temporarily comment it out).
    select *
    from tableA A
    --JOIN viewB B ON A.key = B.key
    WHERE a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)
    example B
    You notice, that values from A are missing. Maybe because there is no matching key in ViewB? Then change the join to an outer join.
    select *
    from tableA A
    LEFT OUTER JOIN viewB B ON A.key = B.key
    WHERE a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)(The outer keyword is optional, left join would be enough).

  • Can anyone tell me how can i optimize this query...

    Can anyone tell me how can i optimize this query ??? :
    Select Distinct eopersona.numident From rscompeten , rscompet , rscv , eopersona , rscurso , rseduca , rsexplab , rsinteres
    Where ( ( (LOWER (rscompeten.nombre LIKE '%caracas%') AND ( rscompeten.id = rscompet.idcompeten ) AND ( rscv.id = rscompet.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rscurso.nombre) LIKE '%caracas%') AND ( rscv.id = rscurso.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rscurso.lugar) LIKE '%caracas%') AND ( rscv.id = rscurso.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rseduca.univinst) LIKE '%caracas%)' AND ( rscv.id = rseduca.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rsexplab.nombempre) LIKE '%caracas%' AND ( rscv.id = rsexplab.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rsinteres.descrip) LIKE '%caracas%' AND ( rscv.id = rsinteres.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rscv.cargoasp) LIKE '%caracas%' AND ( eopersona.id = rscv.idpersona ) )
    OR ( LOWER (eopersona.ciudad) LIKE '%caracas%' AND ( eopersona.id = rscv.idpersona )
    PLEASE IF YOU FIND SOMETHING WRONG.. PLEASE HELP ME.. this query takes me aproximatelly 10 minutes and the database is really small ( with only 200 records on each table )

    You are querying eight tables, however in any of your OR predicates you're only restricting 3 or 4 of those tables. That means that the remaining 4 or 5 tables are generating cartesian products. (n.b. the cartesian product of 5 tables with 200 rows each results in g 200^5 = 320,000,000,000 rows) Then you casually hide this behind "distinct".
    A simple restatement of your requirements looks like this:
    Select eopersona.numident
      From rscompeten,
           rscompet,
           rscv,
           eopersona
    Where LOWER (rscompeten.nombre) LIKE '%caracas%'
       AND rscompeten.id = rscompet.idcompeten
       AND rscv.id = rscompet.idcv
       AND eopersona.id = rscv.idpersona
    UNION
    Select eopersona.numident
      From rscurso ,
           rscv,
           eopersona
    Where LOWER (rscurso.nombre) LIKE '%caracas%'
       AND rscv.id = rscurso.idcv
       AND eopersona.id = rscv.idpersona
    UNION
    Select eopersona.numident
      From rscurso ,
           rscv,
           eopersona
    Where LOWER (rscurso.lugar) LIKE '%caracas%'
       AND rscv.id = rscurso.idcv
       AND eopersona.id = rscv.idpersona
    UNION
    ...From there you can eliminate redundancies as desired, but I imagine that the above will perform admirably with the data volumes you describe.

  • HT201210 I am trying to update Ios7 for iPhone 4 but there is an unknown error occurred like (-23). My Laptop OS is Windows 8. Now how can i solved this query.

    Dear Sir/Madam
    I am trying to update Ios7 for iPhone 4 but there is an unknown error occurred like (-23). My Laptop OS is Windows 08.ios 7 update which can updated and remaining  30minutes are left out. Than after error which can be show as i have mentioned above.
    How can i resolved this error? So please help me.
    Thanks & Regards,
    Vatsal Desai

    Error 20, 21, 23, 26, 28, 29, 34, 36, 37, 40
    These errors typically occur when security software interferes with the restore and update process. Use the steps to troubleshoot security software issues to resolve this issue. In rare cases, these errors may be a hardware issue. If the errors persist on another computer, the device may need service.
    Also, check your hosts file to verify that it's not blocking iTunes from communicating with the update server. See the steps under the heading "Blocked by configuration (Mac OS X / Windows) > Rebuild network information > Mac OS X > The hosts file may also be blocking the iTunes Store." If you have software used to perform unauthorized modifications to the iOS device, uninstall this software prior to editing the hosts file to prevent that software from automatically modifying the hosts file again on restart.
    all of this from
    iTunes: Specific update-and-restore error messages and advanced troubleshooting

  • How can i run this query in BI Answers

    Hi,
    pls tell me how can i run this sql statement in BI Answers....???
    select abc_date,abc_asset_desc,sum(nvl(abc_market_val_lcy,0)+nvl(abc_accr_lcy,0)) "total balance" from abc
    group by abc_date,abc_asset_desc;any help would be appriciated.... :-)
    Regards

    Strange question this one.
    normally with Answers you pick the columns you want to report on and the BI server will construct the SQL for you.
    In this example you would need a star with the abc dimension logical table and a logical fact for abc (these can be in the same table), which has a calculated field for 'Total Balance'.
    You then pick the columns you require and Answer and the BI will automatically add the group by.
    Adrian
    Majendi

  • How can i make this query run for a form

    This query works fine for a sql report
    SELECT *
    FROM STUDENTS
    WHERE given_name||' '||family_name = :P101_USERNAME
    AND password = :P101_PASSWORD;
    But i want it to do the same thing for a form but i dont have the option like i do for the report where i can just apply the condition to the process.
    Anyone any ideas how i could do this so that when i go to the form this information is already there based on the username and password from the previous page?

    Assuming that page 101 is your login form, just lookup the primary key of the student based on the values presented in the login page fields, then set and pass this value to the form page.
    So you would create a process that runs near the very end of the the login processes on page 101, something like this:
    declare
    l_student_id students.student_id%TYPE;
    begin
    select student_id into l_student_id from students where  given_name||' '||family_name = :P101_USERNAME and password = :P101_PASSWORD;
    -- then set the value of your form page primary key field
    :P1_STUDENT_ID := l_student_id;
    end;I've done something similar and it works fine for me, although I haven't looked at it recently.
    Earl

  • How can i construct this query without using CASE statement?

    I've a following code. I'm using this script in Hibernet. So, i cannot use CASE there. Because, hibernet doesn't support case in select statement. How can i construct the same thing which will give me the same result without using CASE?
    SELECT ofc.FLT_LCL_ORIG_DT
         , ofc.CARR_IATA_CD
         , ofc.FLT_NBR
         , ofc.ORIG_ARPT_CD
         , ofc.DEST_ARPT_CD
         , sum( ofc.CNCT_PSGR_CNT) AS BOOKED_CNCT_PSGR_CNT
         , sum( CASE WHEN o.fsdr_mrkt_cd = 'D' AND d.fsdr_mrkt_cd = 'D'           THEN '0'
            ELSE to_char(ofc.CNCT_PSGR_CNT,'99')                             END ) AS BOOKED_INTL_CNCT_PSGR_CNT
         , sum(CASE WHEN o.fsdr_mrkt_cd||d.fsdr_mrkt_cd = 'DD'
                    THEN '0'
            ELSE to_char(ofc.CNCT_PSGR_CNT,'99')
            END) AS NEW_BCNT
    FROM OPS_FLT_CNCT ofc
                        , STN o
                        , STN d
                    WHERE ofc.CNCT_ORIG_ARPT_CD = o.STN_CD
                      AND ofc.CNCT_DEST_ARPT_CD = d.STN_CD
                     -- AND TRUNC(ofc.FLT_LCL_ORIG_DT) = trunc(to_date('22-MAY-2007','DD-MON-YYYY'))
                      AND ofc.CARR_IATA_CD = 'UA'
                      AND ofc.FLT_NBR = '1218'
                      AND ofc.ORIG_ARPT_CD = upper('DEN')                AND ofc.DEST_ARPT_CD = upper('IAD')                  GROUP BY ofc.FLT_LCL_ORIG_DT
                           , ofc.CARR_IATA_CD
                           , ofc.FLT_NBR
                           , ofc.ORIG_ARPT_CD
                           , ofc.DEST_ARPT_CD ;And, the output look like this --
    FLT_LCL_O CARR FLT_N ORI DES BOOKED_CNCT_PSGR_CNT BOOKED_INTL_CNCT_PSGR_CNT   NEW_BCNT
    22-MAY-07 UA   1218  DEN IAD                    9                         0          0
    23-MAY-07 UA   1218  DEN IAD                    1                         0          0
    24-MAY-07 UA   1218  DEN IAD                    2                         1          1
    25-MAY-07 UA   1218  DEN IAD                    1                         0          0Thnaks in advance for reply.
    Regards.
    Satyaki De.
    #####

    2 ideas:
    1. Inline function to perform the CASE funcionaltity for you
    2. Piplelined function to generate the entire dataset
    Both will be slower than just using CASE in a query, but we're working around big constraints

  • How can we rewrite this query for better performance

    Hi All,
    The below query is taking more time to run. Any ideas how to improve the performance by rewriting the query using NOT EXITS or any other way...
    Help Appreciated.
    /* Formatted on 2012/04/25 18:00 (Formatter Plus v4.8.8) */
    SELECT vendor_id
    FROM po_vendors
    WHERE end_date_active IS NULL
    AND enabled_flag = 'Y'
    and vendor_id NOT IN ( /* Formatted on 2012/04/25 18:25 (Formatter Plus v4.8.8) */
    SELECT vendor_id
    FROM po_headers_all
    WHERE TO_DATE (creation_date) BETWEEN TO_DATE (SYSDATE - 365)
    AND TO_DATE (SYSDATE))
    Thanks

    Try this one :
    This will help you for partial fetching of data
    SELECT /*+ first_rows(50) no_cpu_costing */
    vendor_id
    FROM po_vendors
    WHERE end_date_active IS NULL
    AND enabled_flag = 'Y'
    AND vendor_id NOT IN (
    SELECT vendor_id
    FROM po_headers_all
    WHERE TO_DATE (creation_date) BETWEEN TO_DATE (SYSDATE - 365)
    AND TO_DATE (SYSDATE))
    overall your query is also fine, because, the in this query the subquery always contain less data compare to main query.

  • How can I write this query

    Customer Trans          Transaction     Invoice
    Code     Date Type      Amount
    A001     01-JAN-2004     invoice      1000
    A001     01-FEB-2004      Receipt      -1500
    A001     01-MAR-2004     invoice          2000
    A001     01-APR-2002     invoice          2500
    OUTPUT wanted to be...
    Customer Trans     Transaction     Invoice          
    Code     Date Type      Amount     Balance
    A001 01-JAN-2004 invoice 1000          1000
    A001     01-FEB-2004 receipt -1500          500     
    A001     01-MAR-2004 invoice     2000          2500
    A001     01-APR-2002 invoice     2500          5000
    Hi All,
    Please look into the above data, If analytic function LAG(),CASE expression are possible to locate the cursor position in the single query, then any one can help me out about it. I tried but could not.
    Regards,
    Neel.

    You can do this with the SUM analytic function. Taking the emp table, for example,
      1  select ename, sal, SUM(sal) OVER (order by empno)
      2    from emp
      3*  order by empno
    SQL> /
    ENAME                                 SAL SUM(SAL)OVER(ORDERBYEMPNO)
    SMITH                                 800                        800
    ALLEN                                1600                       2400
    WARD                                 1250                       3650
    JONES                                2975                       6625
    MARTIN                               1250                       7875
    BLAKE                                2850                      10725
    CLARK                                2450                      13175
    SCOTT                                3000                      16175
    KING                                 5000                      21175
    TURNER                               1500                      22675
    ADAMS                                1100                      23775
    JAMES                                 950                      24725
    FORD                                 3000                      27725
    MILLER                               1300                      29025
    14 rows selected.Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How can i tune this query?

    Removed the post because of a major logical flaw. Thanks to Boneist for his great idea.
    Edited by: user10633418 on Nov 20, 2008 3:21 AM

    I think I would try rewriting the query to turn the exists clauses into full joins, like:
    SELECT mph.MANIF_NBR AS A1,
           mph.SHPR_ID AS A5,
           mph.MANIF_TYPE AS A4,
           mph.LOAD_NBR AS A21,
           mph.STAT_CODE AS A7,
           mph.CLOSE_DATE AS A10,
           mph.SHIP_DATE_TIME AS A24,
           mph.UPS_PIKUP_NBR AS A9,
           mph.WHSE AS A2,
           mph.PIKUP_REC_NBR AS A8,
           manh_carr_type_for_manif_nbr(mph.WHSE,mpc.MANIF_NBR) AS A26,
           mph.UPS_PLD_UPLOAD_INDIC AS A28,
           'PARCELMANIF_CD' AS A29
    FROM   MANIF_PARCL_HDR mph,
           MANIF_PARCL_CARTON mpc,
           PARCL_SHPMT ps
    WHERE  mph.MANIF_NBR = mpc.MANIF_NBR
    AND    mph.MANIF_NBR = ps.MANIF_NBR
    AND    mph.WHSE = 'HAN'  
    AND    ps.CD_MASTER_ID IN (1001)
    ORDER BY MANIF_PARCL_HDR.MANIF_NBR ASC,
             MANIF_PARCL_HDR.MANIF_TYPE ASCand then compare how fast that runs and what the explain plan is, etc.

  • How can I get this query to work?

    HI
    SELECT  TOP 200  [word] ,COUNT(word) AS count
              FROM [COMMENT_WORDS]
              where word NOT in (SELECT wordText FROM word)
                GROUP BY word
                ORDER BY COUNT desc
    gives me this error:
    Msg 468, Level 16, State 9, Line 1
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
    please help

    Thanks I changed the count name but I am still getting
    Msg 468, Level 16, State 9, Line 1
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
    I also went into the word database and ran
        ALTER DATABASE [word] COLLATE
        Latin1_General_CI_AS
    and now both databases have the same colaltion but I still get the error:
    Msg 468, Level 16, State 9, Line 1
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
    I am using ms sql 2005

  • How can i optimize this query

    SELECT c1,c2 FROM tabla WHERE c1=(SELECT MIN(c1) FROM tabla)
    (i want to get an unique register which contains the minimum value in the table for the field c1)

                                        C1                                     C2
                                         1                                     -1
                                         2                                     -2
                                         3                                     -3
                                         4                                     -4
                                         5                                     -5
                                         6                                     -6
                                         7                                     -7
                                         8                                     -8
                                         9                                     -9
                                        10                                    -10
    10 rijen zijn geselecteerd.
    SQL>
    SQL> SELECT c1,c2 FROM tabla WHERE c1=(SELECT MIN(c1) FROM tabla)
      2  /
                                        C1                                     C2
                                         1                                     -1
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   FILTER
       2    1     TABLE ACCESS (FULL) OF 'TABLA'
       3    1     SORT (AGGREGATE)
       4    3       TABLE ACCESS (FULL) OF 'TABLA'
    SQL>
    SQL> SELECT c1,c2
      2          FROM
      3                  (
      4                  SELECT c1,c2, ROW_NUMBER() OVER (ORDER BY C1) RN
      5                          FROM tabla
      6                  )
      7          WHERE RN = 1
      8  /
                                        C1                                     C2
                                         1                                     -1
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   VIEW
       2    1     WINDOW (SORT PUSHED RANK)
       3    2       TABLE ACCESS (FULL) OF 'TABLA'
    SQL>
    SQL> select min(c1) keep (dense_rank first order by c1) c1
      2       , min(c2) keep (dense_rank first order by c1) c2
      3    from tabla
      4  /
                                        C1                                     C2
                                         1                                     -1
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   SORT (AGGREGATE)
       2    1     TABLE ACCESS (FULL) OF 'TABLA'Regards,
    Rob.

  • How can I write this query In parameterize form so That I can prevent sql Injection

    String strQry = "INSERT INTO tblVoucherType (VhrTypeCode,moduleCode,transCCode,"
    + "voucherType,OrderNumber,active,AccountId) "
    + " values('" + txtVhrCode.Text + "','" + ddlModule.SelectedValue.ToString() + "',"
    + "'" + ddlTrans.SelectedValue.ToString() + "','" + txtVhrName.Text + "','" + btnRadio.SelectedValue + "'"
    + ", '" + status.Checked + "', '" + txtAccount.Text + "')";

    Basically it will look like:
    String strQry = "INSERT INTO tblVoucherType (VhrTypeCode,moduleCode,transCCode, ...)"
    + " values(@VhrCode, @moduleCode, @transCCode, ....)";
    sqlCommand.Parameters.AddWithValue("@VhrCode", txtVhrCode.Text );
    sqlCommand.Parameters.AddWithValue("@moduleCode", ddlModule.SelectedValue.ToString() );
    sqlCommand.Parameters.AddWithValue("@transCCode", ddlTrans.SelectedValue.ToString() );
    .. and so on
    sqlCommand.ExecuteNonQuery();
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How can I optimize this query's performance

    SELECT pu.user_id,
    cd.owner,
    cd.somedata
    FROM client_detail cd,
    client_detail_user_xref pu
    WHERE cd.device_id = 'xxxxxxxxx'
    AND cd.client_detail_id = pu.client_detail_id(+)
    AND(cd.alt_user_id = '12345' OR pu.user_id = '67890')
    Plan hash value: 3532311591
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 247 | 1374 (1)| 00:00:17 |
    |* 1 | FILTER | | | | | |
    | 2 | NESTED LOOPS OUTER | | 1 | 247 | 1374 (1)| 00:00:17 |
    |* 3 | TABLE ACCESS FULL | CLIENT_DETAIL | 1 | 226 | 1371 (1)| 00:00:17 |
    | 4 | TABLE ACCESS BY INDEX ROWID| CLIENT_DETAIL_USER_XREF | 1 | 21 | 3 (0)| 00:00:01 |
    |* 5 | INDEX RANGE SCAN | CLIENT_DETAIL_USER_PK | 1 | | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter("CD"."ALT_USER_ID"='12345' OR "PU"."USER_ID"='67890')
    3 - filter("CD"."DEVICE_ID"='xxxxxxxxx')
    5 - access("CD"."CLIENT_DETAIL_ID"="PU"."CLIENT_DETAIL_ID"(+))
    Edited by: user13805875 on Feb 24, 2011 5:13 AM

    If you are posting a Performance Related Question. Please read
    {thread:id=501834} and {thread:id=863295}.
    Following those guide will be very helpful.

  • How Can I make this query run faster

    SQL> EXPLAIN PLAN FOR SELECT a.txid, a.methodid, a.serviceid, a.nodename, a.env, a.ts, a.te, a.resultcode, a.resultmessage FROM g2log.txmaster a,
    2 g2log.txlookup b WHERE b.key = 'sbcgnfttxuniquedslamportid' AND b.value = 'MTC3LS733001-1-1-2-13' AND a.txid = b.txid ORDER BY ts desc;
    Explained.
    Elapsed: 00:00:00.01
    SQL> @$ORACLE_HOME/rdbms/admin/utlxpls.sql
    PLAN_TABLE_OUTPUT
    Plan hash value: 3790334907
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 578 | 108K| 1267 (1)| 00:00:16 | | |
    | 1 | PX COORDINATOR | | | | | | | |
    | 2 | PX SEND QC (ORDER) | :TQ10001 | 578 | 108K| 1267 (1)| 00:00:16 | | |
    | 3 | SORT ORDER BY | | 578 | 108K| 1267 (1)| 00:00:16 | | |
    | 4 | PX RECEIVE | | | | | | | |
    | 5 | PX SEND RANGE | :TQ10000 | | | | | | |
    | 6 | NESTED LOOPS | | | | | | | |
    | 7 | NESTED LOOPS | | 578 | 108K| 1266 (1)| 00:00:16 | | |
    | 8 | PX PARTITION RANGE ALL | | 578 | 44506 | 109 (0)| 00:00:02 | 1 | 27 |
    | 9 | TABLE ACCESS BY LOCAL INDEX ROWID| TXLOOKUP | 578 | 44506 | 109 (0)| 00:00:02 | 1 | 27 |
    |* 10 | INDEX RANGE SCAN | TX_KEY_VAL | 578 | | 58 (0)| 00:00:01 | 1 | 27 |
    |* 11 | INDEX UNIQUE SCAN | TXMASTER_TXID_PK | 1 | | 1 (0)| 00:00:01 | | |
    | 12 | TABLE ACCESS BY GLOBAL INDEX ROWID | TXMASTER | 1 | 116 | 2 (0)| 00:00:01 | ROWID | ROWID |
    Predicate Information (identified by operation id):
    10 - access("B"."KEY"='sbcgnfttxuniquedslamportid' AND "B"."VALUE"='MTC3LS733001-1-1-2-13')
    11 - access("A"."TXID"="B"."TXID")
    25 rows selected.
    I have gathered stats on the two tables as well
    SQL> select count(*) from g2log.txmaster;
    COUNT(*)
    88812
    SQL> select count(*) from g2log.txlookup;
    COUNT(*)
    228883

    I bellieve that it is disabled as well:
    SQL> show parameter parallel
    NAME TYPE VALUE
    fast_start_parallel_rollback string LOW
    parallel_adaptive_multi_user boolean TRUE
    parallel_automatic_tuning boolean FALSE
    parallel_degree_limit string CPU
    parallel_degree_policy string MANUAL
    parallel_execution_message_size integer 16384
    parallel_force_local boolean FALSE
    parallel_instance_group string
    parallel_io_cap_enabled boolean FALSE
    parallel_max_servers integer 985
    parallel_min_percent integer 0
    parallel_min_servers integer 0
    parallel_min_time_threshold string AUTO
    parallel_server boolean TRUE
    parallel_server_instances integer 2
    parallel_servers_target integer 1024
    parallel_threads_per_cpu integer 2
    recovery_parallelism integer 0

Maybe you are looking for