The /*+ ordered */ hint

This query runs orders of magnitude faster without the hint. The hint causes a merge cartesian join in the explain plan and raises the cost hugely.
I thought the hint was supposed to improve performance. What gives? I am using 11g v2.02
Thanks,
David
select /*+ ordered */
a.ull,
min(b.geo_id),
'2' maskflag
from
POLY_TABLE b,
PNT_TABLE a
where
a.ULL in (select ULL from PNT_TABLE minus select ULL from PIP_TABLE) and
sdo_touch(a.geom, b.geom) = 'TRUE'
group by
a.ull ;

Pl see these threads on how to post a tuning request
When your query takes too long ...
HOW TO: Post a SQL statement tuning request - template posting
http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/sql_elements006.htm#SQLRF50601
HTH
Srini

Similar Messages

  • Does the Order of the tablesjoins in Where clause matter in ORDERED hint?

    The ORDERED hint requests that the tables listed in the FROM clause of a SQL statement be joined in the order specified. But does the order of the join in "where" clause matters?
    Will be there any performance difference between below query? The order of the table in the FROM clause remains the same, but there is a difference in the order of conditions in the WHERE clause
    SELECT /*+ ORDERED */ a.fp_i f
    FROn iw_owner.revenue_fpct b,
    dw_owner.fp_dinn c,
    dw_owner.nanaged_at_dinn a,
    dw_owner.at_dinn_curr d,
    iw_owner.na_progran e,
    dw_owner.fp_dinn_curr f,
    dw_owner.fpn_of_at_dinn g
    WHERE a.nacc_dinn_i = b.nacc_dinn_i
    AND b.fp_dinn_i = c.fp_dinn_i
    AND a.acc_i = d.acc_i
    AND a.acc_nacc_c = e.npn_pro_c
    AND a.fp_i = f.fp_i
    AND b.org_fpn_dinn_i = g.org_fpn_dinn_i(+)
    AND c.fp_i IN ('JG 04')
    AND b.dte_dinn_i BETWEEN '1-Apr-2011' and '30-Apr-2011'
    SELECT /*+ ORDERED */ a.fp_i f
    FROn iw_owner.revenue_fpct b,
    dw_owner.fp_dinn c,
    dw_owner.nanaged_at_dinn a,
    dw_owner.at_dinn_curr d,
    iw_owner.na_progran e,
    dw_owner.fp_dinn_curr f,
    dw_owner.fpn_of_at_dinn g
    WHERE c.fp_i IN ('JG 04')
    AND b.dte_dinn_i BETWEEN '1-Apr-2011' and '30-Apr-2011'
    AND b.fp_dinn_i = c.fp_dinn_i
    AND a.nacc_dinn_i = b.nacc_dinn_i
    AND a.acc_i = d.acc_i
    AND a.acc_nacc_c = e.npn_pro_c
    AND a.fp_i = f.fp_i
    AND b.org_fpn_dinn_i = g.org_fpn_dinn_i(+)
    Thanks

    Gangadhar Reddy wrote:
    Does it matter the order of first 2 tables?This question makes me really wonder. It's fairly easy to see how explain changes when using hints.
    Your question indicates that you do not look at explain plans?
    Then why are you asking about hints in the first place?
    Using hints is something you do when you want to force a specific execution plan as part of some investigation, because you know something that the optimizer does no, or you have found a bug in the optimizert.
    In all cases you know exactly what you are doing.
    The /*+ ORDERED */ is all about you telling the optimizer to join the tables in the order you specified them in the from clause.
    As to your original question, there exists a similar ORDERED_PREDICATES hint.
    Regards
    Peter

  • How to change the order of execution

    How to make a table driving table in the list of joining tables in the from clause?
    for
    select count(1)
    from
    table_a a , table_b b , table_c c
    where a.col1=b.col1
    and b.col2 = c.col2
    I know that we can use ordered hint to make oracle the use the ordered mentioned in the from clause.
    How about joinng order in the where clause.
    Do I need to give any extra hints.
    I understand a bit of checking oracle execution path.
    Is there any material which can give me insight of the same.
    thanks in advance

    Hi,
    hints should be used when there is no way to obtain a correcte execution path having objects analyzed and properly setup.
    In that case, the /*+ ORDERED */ hint after the SELECT clause forces the execution plan to follow the execution order based on the FROM clause.
    Be aware that, if if You have more than 2 tables in the from clause, You can have a Cartesian Product if the from clause is not properly set.
    Hope this helps
    Max

  • /* + ordered */ hint used in relational cube operator

    We are using OWB 10.2.0.3 build a relational datamart. The mapping which loads the fact table has a joiner joining three tables, the result of the joiner goes into the cube operator. We realized that the code created by the cube operator contains the /* + ordered */ hint. This might make sense if you do not have any joiner outside the cube operator, but in our case the hint results into a sub-optimal explain plain.
    Has anyone any idea how to get rid of this hint? What is the reason for this hint?
    Thanks in advance, Maren

    Hi,
    if you open the configuration of the mapping, select cube operators, select your target cube, select table operators, selct your cube table -> what do you see in the property 'Loading hints'?
    Regards,
    Detlef

  • Question on Ordered Hint

    oracle 10g
    hi all i attended an interview yesterday and i interviewer asked me a couple of questions
    For which i dont have an exact answer. i even tried to search on web but i couldn't find the answer.
    1. The ordered  hint is used in conjunction with what?  and why?.
       i explained what ordered hint is but he is not happy.
    2. performance of analytical function vs query with sub-query .
    i voted for analytical function, interviewer said that analytical functions are slow.please help me to find answers.
    thanks
    Edited by: new learner on Jul 30, 2010 7:17 AM

    new learner wrote:
    thanks for the response.
    why do we need to use other hints in conjunction with ordered hint for ordered hint to work.
    why cant i say
    Select /*+ordered*/
    from table_a a , table_b b
    where a.id = b.id ;
    To expand on Dom's comment, you can say it, but if you're going to try to dictate details like this to the optimizer you should also tell it what join method you expect it to use, and what access methods you expect it to use, e.g.
    /*+ ordered full(a) use_nl(b) index(b (id)) */Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    There is a +"Preview"+ tab at the top of the text entry panel. Use this to check what your message will look like before you post the message. If it looks a complete mess you're unlikely to get a response. (Click on the +"Plain text"+ tab if you want to edit the text to tidy it up.)
    +"Science is more than a body of knowledge; it is a way of thinking"+
    +Carl Sagan+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Ordered hint question

    Hi all, I have query, in ap_payselect app engine, which is taking a lot of time to execute. so i used ordered hint (/*+ ORDERED */).
    My question is, will that ordered hint change the result? will we get same result with ordered hint as it was with out ordered hint.
    Please help me.
    Thank you.

    The ORDERED hint won't change the result, that will remain the same. Only the explain plan (it is how Oracle will process the query behind the scene) and maybe the execution time could change (faster or slower).
    Find out more:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements006.htm#sthref659
    Nicolas.

  • Performace problem - and ORDERED hint

    Hello,
    The following query is from oracle application EBS 11i , running on 10203 instance.
    Its take about 28 hour before its finished.
    Its exection plan is very long about 150 lines.
    In order to keep it simple i pasted only the first 35 rows from the ORIGINAL plan.
    Id number 34 bellow shows that the unique index :"HZ_PARTIES_U1" fetched each and every row from the table (1,751,000 rows).
    |  34 | ===============>       INDEX UNIQUE SCAN           | HZ_PARTIES_U1                |  1751K
    SELECT * FROM TABLE(dbms_xplan.display_awr('9r0jrz9ygpt9f'));
    PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
    SQL_ID 9r0jrz9ygpt9f                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    SELECT /*+ index(ap_bank_accounts)   */ TRX_ID, ROW_ID, TRX_NUMBER, AMOUNT
    FROM CE_222_TRANSACTIONS_V
    WHERE BANK_ACCOUNT_ID = :B8 AND CURRENCY_CODE = :B7 AND (:B6 IN ('CREDIT','NSF','REJECTED') OR TRX_TYPE = 'MISC')
    AND DECODE(:B6 , 'MISC_DEBIT', -1, 1) * AMOUNT BETWEEN :B2 * (1 - :B5 )
    AND :B2 * (1 + :B5 )
    AND TRX_DATE BETWEEN (:B1 - :B4 )
    AND (:B1 + :B3 )
    AND NOT EXISTS ( SELECT 'already matched trx' FROM IL_CE_REC WHERE TRX_ROWID = ROW_ID)
    ORDER BY ABS(:B2 -  AMOUNT), ABS(:B1 - TRX_DATE)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    Plan hash value: 1193373660                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    | Id  | Operation                                          | Name                         | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   0 | SELECT STATEMENT                                   |                              |       |       | 23321 (100)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   1 |  SORT ORDER BY                                     |                              |     3 |   228 | 23321  (16)| 00:01:02 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   2 |   NESTED LOOPS ANTI                                |                              |     3 |   228 | 23320  (16)| 00:01:02 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   3 |    VIEW                                            | CE_222_TRANSACTIONS_V        |     3 |   192 | 23320  (16)| 00:01:02 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   4 |     UNION-ALL                                      |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   5 |      FILTER                                        |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   6 |       FILTER                                       |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   7 |        NESTED LOOPS                                |                              |     1 |   395 | 11668  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   8 |         NESTED LOOPS OUTER                         |                              |     1 |   359 | 11667  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   9 |          NESTED LOOPS OUTER                        |                              |     1 |   323 | 11666  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  10 |           FILTER                                   |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  21 |                      HASH JOIN                     |                              |     1 |   150 | 11648  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  22 |                       NESTED LOOPS                 |                              |     1 |    54 |     4   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  23 |                        NESTED LOOPS                |                              |     1 |    18 |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  24 |                         TABLE ACCESS BY INDEX ROWID| AP_BANK_ACCOUNTS_ALL         |     1 |    13 |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  25 |                          INDEX UNIQUE SCAN         | AP_BANK_ACCOUNTS_U1          |     1 |       |     1   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  26 |                         INDEX UNIQUE SCAN          | AP_BANK_BRANCHES_U1          |  2022 | 10110 |     0   (0)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  27 |                        INDEX RANGE SCAN            | FND_LOOKUP_VALUES_U1         |     1 |    36 |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  28 |                       TABLE ACCESS BY INDEX ROWID  | AR_CASH_RECEIPTS_ALL         |     1 |    96 | 11643  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  29 |                        INDEX RANGE SCAN            | AR_CASH_RECEIPTS_N8          |   211K|       |   882  (18)| 00:00:03 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  30 |                      VIEW PUSHED PREDICATE         | RA_HCUSTOMERS                |     1 |    15 |     4   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  31 |                       NESTED LOOPS                 |                              |     1 |    24 |     4   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  32 |                        TABLE ACCESS BY INDEX ROWID | HZ_CUST_ACCOUNTS             |     1 |    18 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  33 |                         INDEX UNIQUE SCAN          | HZ_CUST_ACCOUNTS_U1          |     1 |       |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  34 | ===============>       INDEX UNIQUE SCAN           | HZ_PARTIES_U1                |  1751K|    10M|     1   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  35 |                     TABLE ACCESS BY INDEX ROWID    | AR_RECEIPT_METHODS           |     1 |     8 |     1   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     When i added an ORDERED hint inside the view the plan changed as followed:
    |  30 |                      VIEW PUSHED PREDICATE         | RA_HCUSTOMERS                |     1 |    15 |     4   (0)| 00:00:01 |
    |  31 |                       NESTED LOOPS                 |                              |     1 |    24 |     4   (0)| 00:00:01 |
    |  32 |                        TABLE ACCESS BY INDEX ROWID | HZ_CUST_ACCOUNTS             |     1 |    18 |     3   (0)| 00:00:01 |
    |* 33 |                         INDEX UNIQUE SCAN          | HZ_CUST_ACCOUNTS_U1          |     1 |       |     2   (0)| 00:00:01 |
    |* 34 |  ==============>       INDEX UNIQUE SCAN           | HZ_PARTIES_U1                |     1 |     6 |     1   (0)| 00:00:01 |
    |* 35 |                     INDEX UNIQUE SCAN              | FND_LOOKUP_VALUES_U1         |     1 |    36 |     1   (0)| 00:00:01 |
    You can see that line 34 is now return just 1 row and not 1751K rows.Oracle documentaion : http://download.oracle.com/docs/cd/A97630_01/server.920/a96533/hintsref.htm said:
    You might want to use the ORDERED hint to specify a join order if you know something about the number of rows selected
    from each table that the optimizer does not.
    Since , i dont want to use the ORDERED hint , i would like to know what statistics information are missing to the optimizer ? What should i look for ?
    I have an uptodate statiscts , and bellow are the resoults .
    SQL> select table_name,last_analyzed,num_rows,blocks
      2  from dba_tables
      3  where table_name='HZ_PARTIES';
    TABLE_NAME                     LAST_ANAL   NUM_ROWS     BLOCKS
    HZ_PARTIES                     06-JUN-10    1760190      65325
    SQL>
    SQL>
    SQL> select count(*) from apps.HZ_PARTIES;
      COUNT(*)
       1771794
    SQL> select index_name,last_analyzed,num_rows,clustering_factor,blevel,distinct_keys
      2  from dba_indexes
      3  where table_name='HZ_PARTIES'
      4  and index_name like '%U1';
    INDEX_NAME                     LAST_ANAL   NUM_ROWS CLUSTERING_FACTOR     BLEVEL DISTINCT_KEYS
    HZ_PARTIES_U1                  06-JUN-10    1758162            158739          2       1758162Thanks for your help

    Nothing I can see in your in your post relates to the optimizer and you, yourself, wrote:
    Oracle documentaion : http://download.oracle.com/docs/cd/A97630_01/server.920/a96533/hintsref.htm  said:
    You might want to use the ORDERED hint
    {code}
    so clearly the Oracle documentation does say that.
    Either post in the correct forum, and explain your reasoning, or I can not help you further.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Can anyone explain me why iTunes is just changing song names an messing up the order?

    I have different songs that I would like to upload onto the phone iOS 6.1.3
    So I copy the songe into a playlist in iTunes.
    Song names are
    whatever_xx-001
    whatever_xx-002
    whatever_xx-020
    what does iTunes? It just changes the song names and make a complete mess with the order of the songs:
    whatever xx 1
    whatever xx 20
    whatever xx 2
    My question is, if iTunes is not usable for copying numbered songs? I cannot imagine that this tool is so stupid? Or am I doing something wrong?
    Thank you for a hint.

    Now I look more carefully at your list, I see what you mean.
    iTunes does have a method for Artist sorting if the Sort fields are empty (as most of mine are), but offhand, I don't know much about it to be honest. The glaring issue in the your screenshot is Ministry Of Sound.
    If any of the other experienced contributors add to this thread (note the number of points they have) with better advice than I can offer, take it.
    In the meantime, start with the Ministry Of Sound and check the Sort Artist field. If you highlight everything by an artist, or a complete album, and select Get Info/Sorting, you see this view:
    and if you select just a single song, it's this view:
    I assume, unless you tell me otherwise, that the Ministry Of Sound entries will show something in there which is causing iTunes to put them in with the entries for A. Replace it with Ministry Of Sound. If the field is blank (which it will be if there are two different entries in your selection) simply type in Ministry Of Sound. Does that make any difference?
    If it does, then check your other entries to see what is causing the issue with them.
    You may find the the artist "Joey Bada$$" has been set to sort by Bada$$, Joey.
    This screenshot of my Artists column may explain why B.o.B is before Baauer:
    If you don't like it that way, change the entry in the Sort Artist field to suit you.

  • How can we determine the order of DCs getting deployed in a SCA

    Hi,
    I have a set of DCs to be deployed on to the server. I create a SCA out of them, and then try to deploy it through the SDM or directly deploy the DCs with the IDE.
    Dcs are like below,
    tc/mdm/srmcat/uiprod
    tc/mdm/srmcat/uisearch
    tc/srmcat/custom/pr/convert.
    Now the last DC 'convert' is been used in the DC mentioned above 'uiprod'. (its a dependent DC to uiprod).
    So when I try to deploy the SCA (or in the IDE) for the first time on my J2EE engine, i get a warning saying that uiprod is not deployed properly as the dependent DC 'convert' is not present. But when I deploy it for the second time the message vanishes as the 'convert' is already present in the J2EE now. So can I avoid this double deployment, by altering the order and deploying the convert before the other DCs. Can I do this when I am forming the SCA, or is there a option in IDE to set this.
    Generally while deployment the dependencies are checked and the DCs are deployed in proper order, I feel the issue is occuring here because of different package structure one being tc/mdm/srmcat/.. and other being tc/srmcat/custom/pr/..
    Please do let me know your suggestions on the same.
    Thanks,
    Prakash

    Hi Siarhei,<br>
    <br>
    Thanks for your reply.<br>
    <br>
    Yes all these DCs do belong to the same SCA. I tried adding the deploy time dependency (by changing the dc def file) as you <br>had mentioned but the issue is still there. Below is the log attached.
    <br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53553sap.comtcmdmsrmcatconfig.sda<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53554sap.comtcmdmsrmcatimport.ear<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53555sap.comtcmdmsrmcatredirect.ear<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53556sap.comtcmdmsrmcatsortutility.ear<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53557sap.comtcmdmsrmcatuiconf.ear<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53558sap.comtcmdmsrmcatuiprod.ear<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53559sap.comtcmdmsrmcatuisearch.ear<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53560sap.comtcmdmsrmcatuiutil.ear<br>
    URL to deploy : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53561sap.comtcsrmcatcustompr~convert.ear<br>
    <br>
    Result<br>
    => successfully deployed : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53553sap.comtcmdmsrmcatconfig.sda<br>
    => successfully deployed : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53554sap.comtcmdmsrmcatimport.ear<br>
    => successfully deployed : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53555sap.comtcmdmsrmcatredirect.ear<br>
    => successfully deployed : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53556sap.comtcmdmsrmcatsortutility.ear<br>
    => successfully deployed : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53557sap.comtcmdmsrmcatuiconf.ear<br>
    deployed with warning : file:/C:/DOCUME1/I054568/LOCALS1/Temp/temp53558sap.comtcmdmsrmcatuiprod.ear<br>
    Finished with warnings: development component 'tc/mdm/srmcat/uiprod'/'sap.com'/'MAIN_SMDM3VAL_D'/'20091215181625'/'0':<br>
    Caught exception during application startup from SAP J2EE Engine's deploy service:<br>
    java.rmi.RemoteException: Error occurred while starting application sap.com/tc/mdm/srmcat/uiprod and wait. Reason: <br>Clusterwide exception: server ID 301385150:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide <br>exception: Failed to prepare application ''sap.com/tcmdmsrmcatuiprod'' for startup. Reason=Clusterwide exception: <br>Failed to start application ''sap.com/tcmdmsrmcatuiprod'': The referenced <br>application ''sap.com/tcsrmcatcustomprconvert'' can''t be started. Check the causing exception for details. Hint: Is the <br>referenced application deployed correctly on the server?<br>
    <br>
    <br>
    <br>I do understand the issue here, while deploying uiprod it searches for pr~convert.  But I am not sure why the sca gets <br>deployed in this order. Even from IDE and directly in SDM i get this issue. When I do the same deployment again, then the warnings are gone.<br>
    <br>
    <br>So is there a possiblity that pr~convert gets deployed before uiprod. Is that in our control ?
    <br>
    Thanks,<br>
    <br>Prakash

  • Ordered hints in Oracle:

    There's a fairly popular Ordered Hint example on the web as follows:
    <CODE>
    select /*+ ordered use_nl(bonus) parallel(e, 4) */
    e.ename,
    hiredate,
    b.comm
    from
    emp e,
    bonus b
    where
    e.ename = b.ename
    </CODE>
    I would like to know what the "parallel(e, 4)" clause does. Where does the "4" come from? What is "parallel" here?
    I also have another question: If I have 5 tables--T_OREGON, T_UTAH, T_VIRGINIA, T_TEXAS, and T_OKLAHOMA--lined up in a join right behind a FROM, coming in at row counts of
    T_OREGON: [a lot of rows; a lot more than T_UTAH]
    T_UTAH: [smaller than T_OREGON] 40550 rows
    T_VIRGINIA: 14 rows
    T_TEXAS: 66 rows
    T_OKLAHOMA: 8 rows
    like so:
    ...from T_OREGON or, T_UTAH ut, T_VIRGINIA va, T_TEXAS tx, T_OKLAHOMA ok...
    my question is, if an Ordered hint can be used here, is it that the smallest table (in this case T_OKLAHOMA) gets placed first in the join and the rest of the table ascension in the join doesn't matter? Or is it that T_OKLAHOMA gets placed first in the join, followed by T_VIRGINIA [at 14 rows], followed by T_TEXAS, T_UTAH, and finally T_OREGON?
    Thank you for any help that you can provide.

    It is why my other question involved the table order
    behind a FROM keyword, (when employing an Ordered
    hint).
    Can anybody help with that question? Thanks again.With rule based optimizer order was important.
    With cost based optimizer (optimizer mode one of the all_rows, first_rows, forst_rows_n) order is not important Oracle itself chooses the order how to join tables.
    If you have gathered statistics leave CBO do his work. See more about optimizer here http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm
    And if you have taken this citation out of http://articles.techrepublic.com.com/5100-22_11-1050199.html then there are at least following problems:
    1) article is 4 years old
    2) article doesn't say anything about downsides using this hint e.g. what if your data changes and order is not relevant anymore, quite high possibility that query is changed but hint forgotten to change, maintaining additional level of complexity where Oracle has invested many many resources to assist users enhancing CBO
    3) and there is at least 1 fallacy in this article these sentences are wrong:
    "When Oracle evaluates table join orders, it must consider every possible combination of tables. For example, a six-way table join has 720 (permutations of 6, or 6 * 5 * 4 * 3 * 2 * 1 = 720) possible ways that the tables can be joined together. This permutation issue becomes even more pronounced when you have more than 10 joined tables in a query: For a 15-way table join, there are over one trillion (1,307,674,368,000 to be exact) possible query permutations that must be evaluated."
    (emphasis is mine - Gints)
    CBO abandons each permutation as soon as the cost is higher than the smallest from previous steps. So in reality CBO is much smarter than article tries to explain.
    If you really want to know how CBO works then I can only suggest to get book Cost based oracle fundamentals by Jonathan Lewis.
    Gints Plivna
    http://www.gplivna.eu

  • How to define the order of GROUPBYs, JOINs and FILTERS in an interface?

    Hello,
    I would like to define an interface which implements the following logic:
    Give me a list of all customers with less then 2 orders in status = 'A'.
    SELECT C.Name, o.cnt
    FROM CUSTOMER C
    LEFT OUTER JOIN (SELECT cust_id, count(*) cnt FROM ORDERS WHERE status = 'A' GROUP BY cust_id) O
    ON C.cust_id = O.cust_id
    WHERE O.cnt < 2 OR O.cust_id IS NULL
    In this case, the right order of operations is essential:
    First apply filter, then group, then join, then apply the second filter.
    How can I define this in an ODI interface?
    Thanks in advance for any hints...
    Best regards,
    Karol

    Defining JOINs order :
    1 - Go in topology manager and verify that your technologie support the ISO ordered join ( left inner join ...)
    NB : by default Oracle data sources are configured with the old syntax ( ie : columns(+)=expr )
    - Open technology Oracle: Check SQL ISO
    - Go to the SQL tab
    - select "FROM" in the filter place
    - verify the join syntax
    2 - Define the alias order in the source table
    3 - Check the ordered join (ISO) and a num-order on the join operator
    Defining GROUPBYs and FILTERS orders seems to be impossible
    but you can create a mapping as a view and use this mapping as a source in an other one !

  • LEADING or ORDERED hint in OWB 10gR2

    Hi,
    How does one add a LEADING or ORDERED hint to a mapping in OWB 10g R2?
    The usual way of adding a hint is to "Configure" the map and add the extraction or loading hint under the table (data source) operators. However, the hints in such a case are specific to table under consideration. A NO_INDEX or a PARALLEL hint can be applied under it.
    However, a LEADING or a ORDERED does not necessarily depend on the table but is common to the entire SQL. Although OWB allows attaching the LEADING or ORDERED hint under Map Configure > Table Operators > [Table Name] > Hints > Extraction Hints, it does not attach the correct table aliases.
    Has anyone encountered this problem before? If you've found a workaround, please share it.
    Thanks, JD

    Hi,
    In OWB 10.2 it's often not easy to set hints. Often it's only possible to set them correctly using workarounds :-(
    The most important is not where you define the hint in OWB but where OWB puts it in the generated code.
    So if you want to have the LEADIND or ORDERING hint in your code you could define it at the level of the target table under:
    Map Configure > Table Operators > [Target Table Name] > Hints > Loading Hints
    Another way to do it would be to generate a dummy filter (1=1) in the mapping and then to define the hint for this filter.
    For hints which are not related to a specific table I mostly used the trial-and-error method to find out where I have to define it in OWB.
    Good luck

  • ORDERED hint in Oracle 11gR2

    Do we have any difference in 11g with the way /*+ ORDERED */ hint works, compared to 10g? Will this hint cause a plan change in 11g, compared to its plan when used in 10g (assuming no other items contribute to a change of plan)?

    Welcome to the forum.
    Do you mean 10.1 or 10.2 and 11.1 or 11.2?
    Are you aware of the existence of http://tahiti.oracle.com?
    Just test it, follow these instructions:
    http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
    SQL and PL/SQL FAQ

  • Why can't I burn mp3 files in the order I choose? iTunes alphabetizes!

    I have set up a playlist in the exact order I want the songs to go--in alpha order by album, but no matter what I do, when I try to burn the playlist, iTunes burns it in alpha order by song title.
    Tell me that this is not the only way iTunes will allow you to burn playlists, please.

    Hey - thanks for the pointer to the help doc, but it doesn't make sense to me -- the first hint says:
    How to burn by playlist order
    1. Create your playlist.
    2. Click "Song" to sort the playlist by song.
    3. Make sure the songs are in the order you want to hear them on the CD.
    4. Click Burn CD.
    5. Insert a blank CD and burn the disc.
    #2 - Click "Song" to sort the playlist by song... ? So, where is this mysterious "song" button to click? Right now, I have it sorted by artist, because that's how I'd like it to play, but I don't see an option for song. And at the moment, no matter what I select to sort it by, it burns in alphabetical order by song title.
    None of this makes sense to me.

  • How can I control the order of photos in a Ravel slideshow?

    I'm using the web version.  After I uploaded my photos, I discovered that Ravel does not display them in alphanumeric file name order.  Instead it appears to order them by file date.  Unfortunately, I have always altered the file name to set up the order of my photos.  In the future, if I use PhotoShop to manually alter the date of the jpeg files, and then upload them, will Ravel "see" the altered date and change the order?  I've used up my upload limit, so I can't just try it and see.
    On a slide note, I tried the method of sharing an album on PC as described in the Adobe FAQ, and it worked pretty well.  Two minor things I'd add:  (1) You have to first click the URL field before the copy, and (2) the URL includes two non-functional characters at the end (#!) that can be deleted from the e-mail.

    Yes, as you noticed, the only option for Revel is to sort by date.  If you change the date that the photo was taken, it will indeed change the order.  This is something you can also do within the Revel app, though not currently with the web version you are using.

Maybe you are looking for

  • Vendor line item due date error

    I found the net due date in vendor line item report is not correct. vendor payment term is 30 days, accounting document posting date is Jan1. 2010,but net due date is Jan.1.2010, it should be 1.Feb,2010. why system calculate wrongly? Thanks

  • Printing to PDF from Classic?

    Is there anyway to accomplish this? ~dave

  • Bounce with effects

    Hi Forum i've a 6 part vocal line and one each track via bus a reverb. When i do bounce in place i get a dry track without. What is the banal basic procedure for bouncing with effects. addendum : I dont want a full bounce I want the 6 traks separat b

  • OracleDataAdapter returning incorrect schema information

    Hi everyone. I have a very reproducible case where the DataTable schema created by the OracleDataAdapter is incorrect. It is driving me crazy :-). ==================== OracleConnection cnn = new OracleConnection("User ID=XXX;Password=XXX;Data Source=

  • URLConnection Timeouts

    I am using XmlRpc for my communications and sometimes, my application hangs after sending the data to the server. I am assuming the packets get lost, but even so, is there any way I can put a timeout on the URLConnection?? I could then either re-try