Hint USE_HASH involving subqueries

Hello

We request that deals with millions of lines through sequential readings, index analysis xtable_id_IDX is the treatment of about 20 million, ytable_pk index records fewer lines of treatment.

I think as first rowsource treats a wide range of data, nested loop is more expensive, so wanted to try to use hint USE_HASH to force the ytable smaller that build table and xtable as probe, but the optimizer table is recovering not the USE_HASH hint, do not know if it is due to not in / of a subquery.


Could you please help if I can force the optimizer to use hash join with ytable (ytable_pk rowsource) as array of generation and to probe the other's.

It is fine if we use full scan tips complete the two tables instead of the index, I just wanted to see if we can force HASH join in the case.


PS: Change the names of tables, real plan


UPDATE t SET xtable_id = X Xtable

WHERE (xtable_id) NOT IN (SELECT xtable_id FROM ytable)

------------------------------------------------------------------------------------------------

| ID | Operation | Name                     | Lines | Bytes | Cost (% CPU). Time |

------------------------------------------------------------------------------------------------

|   0 | UPDATE STATEMENT.                          |     1.    20.     1 (0) | 00:00:01 |

|   1.  UPDATE | XTABLE.       |       |            |          |

|   2.   ANTI NESTED LOOPS.                          |     1.    20.     1 (0) | 00:00:01 |

|   3.    INDEX SCAN FULL | xtable_id_IDX |     1.    13.     0 (0) | 00:00:01 |

|*  4 |    INDEX UNIQUE SCAN | ytable_PK |     1.     7.     1 (0) | 00:00:01 |

------------------------------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):

---------------------------------------------------

4 - access ("xtable_id"="ytable_id")

Thanks for your time.

It seems that the plan you want is probably

----------------------------------------------------------------------------------------------------

| ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |

----------------------------------------------------------------------------------------------------

|  0 | UPDATE STATEMENT.                   |    17 M |  230 M |        |  4552K (1) | 15:10:26 |

|  1.  UPDATE | XTABLE.       |      |        |            |          |

|  2.  HASH JOIN ANTI RIGHT |                   |    17 M |  230 M |        |  4552K (1) | 15:10:26 |

|  5.    FULL RESTRICTED INDEX SCAN FAST | YTABLE_ID_IDX |    46 M |  312 M |        |  26472 (1) | 00:05:18 |

|  3.    FULL RESTRICTED INDEX SCAN FAST | XTABLE_PK |  1728M |   11G |        |  4364K (1) | 14:32:57 |

----------------------------------------------------------------------------------------------------

To do this, you must refer to something like:

Update

/*+

qb_name (main)

UNNEST (@subq)

attack (t2@main t1@subq)

USE_HASH (T1@subq)

swap_join_inputs (T1@subq)

index_ffs (T1@subq)

index_ffs (T2@main)

*/

XTABLE t2

Set t2.xtable_id = X

where t2.xtable_id not in)

Select / * + qb_name (subq) * / ytable t1 t1.n1

)

/

Whatever you do, it's going to be pretty nasty because of the magnitude of the problem - just hope that you update a large number of lines - and one of the problems is that you will update the index you use pilot request, so that you're going to do nasty things to read-consistency to your own update.

I think the trick (as suggested above) HASH_AJ may have been deprecated in 10g, is said by the way.

Concerning

Jonathan Lewis

Tags: Database

Similar Questions

  • Optimizer ignoring the advice? or instant messages, something wrong...

    I have an update that updates records of 500-600 k. This is part of the very sensitive process in order to lock the execution plan im using tips. Advice was my last resort. Anyway, when I explained the plan he uses HASH JOIN. It uses in the production as well. but in the load test, explain plan shows the JOIN by HASH, but when running, I think that it displays the variable bing and don't LOOP IMBRIQUEE? don't know why? If I remove hint USE_HASH explain shows nested loop... I created outline to see what oracle will do, and using its similar (same not) advice,... I use tips in the wrong way or optimizer something wrong? If the plan uses HASHJOIN its been in 10 minutes if this plan uses the NESTEDLOOP we had to kill the process after 30-40 minutes. What is happening in our environment loadtest, works in prod (wants to say that there is not a problem, it's not today)


    UPDATE
    (SELECT / * +)
    QB_NAME (MAIN_EDR)
    USE_HASH (@SUBQ_MMT mmt0)
    ATTACK (rec0 mmt0)
    INDEX_RS (@SUBQ_MMT mmt0 PSP_MONEY_MOVEMENT_TRANSAC_FK3)
    INDEX_RS (rec0 PSP_ENTRY_DETAIL_RECORD_I2)
    UNNEST (@SUBQ_MMT)
    MERGE (@MAIN_EDR)
    */
    REC0. ENTRY_DETAIL_RECORD_SEQ,
    REC0.trace_number,
    REC0. N_A_C_H_A_FILE_FK,
    REC0. RECORD_DATA,
    REC0. Version
    REC0. MODIFIER_ID,
    REC0. MODIFIED_DATE
    OF PSP_ENTRY_DETAIL_RECORD rec0
    WHERE
    REC0. N_A_C_H_A_FILE_FK is null
    AND rec0.initiation_date =: p_offload_date
    - AND REC0. RECORD_DATA IS NOT NULL
    AND rec0. N_A_C_H_A_FILE_TYPE =: p_nacha_file_type
    AND EXISTS (SELECT / * + qb_name (SUBQ_MMT) * /)
    ' T '
    OF PSP_MONEY_MOVEMENT_TRANSACTION mmt0
    WHERE REC0. MONEY_MOVEMENT_TRANSACTION_FK = MMT0. MONEY_MOVEMENT_TRANSACTION_SEQ
    AND mmt0.offload_batch_fk =: p_offload_batch_id)
    ORDER BY rec0. LEGAL_NAME, rec0.COMPANY_fk, REC0. N_A_C_H_A_BATCH_TYPE, REC0. RECORD_DATA, REC0. AMOUNT, REC0. ENTRY_DETAIL_RECORD_SEQ
    ) CBC
    SET
    TRACE_NUMBER = decode (nvl(record_data,'0'),'0 ', null, seq_trace_number.nextval);
    N_A_C_H_A_FILE_FK =: v_nacha_file_id,
    VERSION = VERSION + 1,
    MODIFIER_ID =: p_user_id,
    MODIFIED_DATE =: v_utc_date


    SQL > SELECT * FROM table (DBMS_XPLAN. DISPLAY);
    Hash value of plan: 2695729968



    ----------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time | Pstart. Pstop |
    ----------------------------------------------------------------------------------------------------
    | 2 ¾ UPDATE STATEMENT. 13004. 4330K | 31595 (1) | 00:06:20 |
    | 1. UPDATE | PSP_ENTRY_DETAIL_RECORD |
    | 2. SEQUENCE | SEQ_TRACE_NUMBER |
    | 3. SORT ORDER BY | 13004. 4330K | 9064K | 31595 (1) | 00:06:20 |
    |* 4 | SEMI HASH JOIN | 13004. 4330K | 3560K | 30644 (1) | 00:06:08 |
    | 5. RANGE OF SINGLE PARTITION | 13004. 3403K | 20532 (1) | 00:04:07 | KEY |
    |* 6 | TABLE ACCESS BY LOCAL INDEX ROWID | PSP_ENTRY_DETAIL_RECORD | 13004. 3403K | 20532
    |* 7 | INDEX RANGE SCAN | PSP_ENTRY_DETAIL_RECORD_I2 | 429K | | 1772 (1) | 00:0
    | 8. TABLE ACCESS BY INDEX ROWID | PSP_MONEY_MOVEMENT_TRANSACTION | 194K | 13 M |
    |* 9 | INDEX RANGE SCAN | PSP_MONEY_MOVEMENT_TRANSAC_FK3 | 194K | | 2168 (1) | 0
    ----------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    4 - access("REC0".") MONEY_MOVEMENT_TRANSACTION_FK "= 'MMT0'." MONEY_MOVEMENT_TRANSACTION_SEQ')
    6 - filter("REC0".") N_A_C_H_A_FILE_FK' IS NULL AND 'REC0 '. ' N_A_C_H_A_FILE_TYPE ' =: P_NACHA_FILE_TYPE.
    7 - access("REC0".") INITIATION_DATE '= TO_TIMESTAMP (:P_OFFLOAD_DATE)).
    9 - access("MMT0".") OFFLOAD_BATCH_FK "(=:P_OFFLOAD_BATCH_ID)"

    24 selected lines.





    But during the actual performance, it changes the nested loop join...




    -----------------------------------------------------------------------------------------------------------------------
    | ID | Operation | Name | E - lines. OMem | 1Mem | Used Mem.
    -----------------------------------------------------------------------------------------------------------------------
    | 1. UPDATE | PSP_ENTRY_DETAIL_RECORD |
    | 2. SEQUENCE | SEQ_TRACE_NUMBER |
    | 3. SORT ORDER BY | 1. 73728 | 73728 |
    |* 4 | TABLE ACCESS BY LOCAL INDEX ROWID | PSP_ENTRY_DETAIL_RECORD | 1 | | | |
    | 5. NESTED LOOPS | 1 | | | |
    | 6. UNIQUE FATE | 1. 73728 | 73728 |
    | 7. TABLE ACCESS BY INDEX ROWID | PSP_MONEY_MOVEMENT_TRANSACTION | 1 | | | |
    |* 8 | INDEX RANGE SCAN | PSP_MONEY_MOVEMENT_TRANSAC_FK3 | 1 | | | |
    | 9. RANGE OF SINGLE PARTITION | 226K | |
    | * 10 | INDEX RANGE SCAN | PSP_ENTRY_DETAIL_RECORD_I2 | 226K | |
    -----------------------------------------------------------------------------------------------------------------------

    AFTER THE CREATION OF SKETCH



    SQL > SELECT * from user_outline_hints;

    NAME NŒUD STADIUM JOIN_POS HINT
    ------------------------------ ---------- ---------- ---------- ------------------------------------
    BDU 1 1 0 USE_HASH (@"SALT$ 798CEC2A" "MMT0"@"SUBQ_MMT")
    BDU 1 1 0 LEADING (@"SALT$ 798CEC2A" "REC0"@"MAIN_EDR" "MMT0"@"SUBQ_MMT")
    1 1 2 INDEX_RS_ASC BDUS (@"SALT$ 798CEC2A" "MMT0"@"SUBQ_MMT" ("PSP_MONEY_MOVEMENT_TRANSACTI)
    1 1 1 INDEX_RS_ASC BDUS (@"SALT$ 798CEC2A" "REC0"@"MAIN_EDR" ("PSP_ENTRY_DETAIL_RECORD".) "EN
    BDU 1 1 0 OUTLINE(@"MAIN_EDR")
    BDU 1 1 0 OUTLINE(@"UPD$1")
    BDU 1 1 0 OUTLINE(@"SUBQ_MMT")
    BDU 1 1 0 MERGE(@"MAIN_EDR")
    BDU 1 1 0 OUTLINE(@"SEL$0E53DE07")
    BDU 1 1 0 UNNEST(@"SUBQ_MMT")
    BDU 1 1 0 OUTLINE_LEAF(@"SEL$798CEC2A")

    NAME NŒUD STADIUM JOIN_POS HINT
    ------------------------------ ---------- ---------- ---------- ------------------------------------
    1 1 ALL_ROWS BDUS 0
    BDU 1 1 0 OPTIMIZER_FEATURES_ENABLE ('10.2.0.3')
    BDU 1 1 0 IGNORE_OPTIM_EMBEDDED_HINTS

    14 selected lines.

    Published by: user8846248 on December 17, 2009 12:18

    Published by: user8846248 on December 17, 2009 12:20

    I guess you have a point there. I always had the feeling that boards are very little documented. If they had the proper documentation, people won't make some common mistakes. I understand better advice after reading your blog/book is better than the documentation. Thanks for the good work and please continue.

  • SQL Performance question

    Hello

    The following query performs badly when the predicate

    AND (v_actionFlag IS NULL or ACTION_CODE = v_actionFlag)

    is present. In all executions of the query v_actionFlag will be NULL. In addition, because of the plan when the predicate is included, the returned results are incorrect. We seek to treat rows with the lowest priority. With the included predicate query performs the join, gets 20 lines, sorts, and puts back them rather than getting 20 lines with the lowest priority through the index of QUEUE_TAB0 and return of these.

    The questions I have are-

    -Why the predicate affects the query in this way
    -What is the difference between the HASH JOIN ANTI and HASH JOIN RIGHT ANTI


    We were able to remove this predicate as the functionality it supports has not yet been implemented.



    Background

    Version of DB - 10.2.0.4
    optimizer_features_enable - 10.2.0.4
    optimizer_mode - ALL_ROWS
    Table
    
    - table has approximately 475,000 rows and the statistics are up to date
    
    
    sql> desc queue_tab
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     ENTITY_KEY                                NOT NULL NUMBER(12)
     ENTITY_TYPE                               NOT NULL CHAR(1)
     ACTION_CODE                               NOT NULL CHAR(1)
     REPORT_NO                                 NOT NULL NUMBER(12)
     PRIORITY                                  NOT NULL NUMBER(4)
    
    
    
    Indexes
    
    Primary Key (QUEUE_TAB_PK)
    
     ENTITY_KEY                                 
     ENTITY_TYPE                                
     ACTION_CODE                                
     REPORT_NO 
    
    
    Non Unique Index (QUEUE_TAB0)
    
     PRIORITY  
     ENTITY_KEY   
     ENTITY_TYPE  
     ACTION_CODE 
    
    
    
    Cursor
    
    
            SELECT /*+ INDEX_ASC (main QUEUE_TAB0) */
                   REPORT_NO
                 , ENTITY_TYPE
                 , ENTITY_KEY
                 , ACTION_CODE
                 , PRIORITY
              FROM QUEUE_TABV01 main
             WHERE PRIORITY > 1
               AND (v_actionFlag IS NULL OR ACTION_CODE = v_actionFlag )
               AND NOT EXISTS
                   ( SELECT /*+ INDEX_ASC (other QUEUE_TAB_pk) */ 1
                       FROM QUEUE_TABV01 other
                      WHERE main.ENTITY_TYPE = other.ENTITY_TYPE
                        AND main.ENTITY_KEY = other.ENTITY_KEY
                        AND main._ACTION_CODE IN ( constant1, constant2 )
                        AND other.ACTION_CODE IN ( constant3, constant4 ) )
               AND NOT EXISTS
                   ( SELECT 1 FROM QUEUE_TABV01 multi
                      WHERE main.ENTITY_TYPE = multi.ENTITY_TYPE
                        AND main.ENTITY_KEY = multi.ENTITY_KEY
                        AND multi.PRIORITY = 1 )
               AND ROWNUM < rowCount + 1
             ORDER BY PRIORITY, ENTITY_KEY, ENTITY_TYPE,
                      ACTION_CODE;
    
    
                                     
    Plan when predicate "AND (v_actionFlag IS NULL OR ACTION_CODE = v_actionFlag )" is present
    
    
    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       21      5.53       5.40          2     780463          0          20
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total       23      5.53       5.40          2     780463          0          20
    
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 60     (recursive depth: 1)
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
         20  SORT ORDER BY (cr=780463 pr=2 pw=0 time=5400939 us)
         20   COUNT STOPKEY (cr=780463 pr=2 pw=0 time=5400872 us)
         20    HASH JOIN ANTI (cr=780463 pr=2 pw=0 time=5400823 us)
     459033     TABLE ACCESS BY INDEX ROWID QUEUE_TAB (cr=780460 pr=2 pw=0 time=4640394 us)
     459033      INDEX RANGE SCAN QUEUE_TAB0 (cr=608323 pr=1 pw=0 time=3263977 us)(object id 68038)
      10529       FILTER  (cr=599795 pr=1 pw=0 time=2573230 us)
      10529        INDEX RANGE SCAN QUEUE_TAB_PK (cr=599795 pr=1 pw=0 time=2187209 us)(object id 68037)
          0     INDEX RANGE SCAN QUEUE_TAB0 (cr=3 pr=0 pw=0 time=34 us)(object id 68038)
    
    
    
    
    Plan when predicate "AND (v_actionFlag IS NULL OR ACTION_CODE = v_actionFlag )" is removed
    
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.02       0.00          0          0          0           0
    Fetch       21      0.05       0.05          0       6035          0          20
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total       23      0.07       0.06          0       6035          0          20
    
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 60     (recursive depth: 1)
    
    Rows     Row Source Operation
    -------  ---------------------------------------------------
         20  SORT ORDER BY (cr=6035 pr=0 pw=0 time=54043 us)
         20   COUNT STOPKEY (cr=6035 pr=0 pw=0 time=962 us)
         20    HASH JOIN RIGHT ANTI (cr=6035 pr=0 pw=0 time=920 us)
          0     INDEX RANGE SCAN QUEUE_TAB0 (cr=3 pr=0 pw=0 time=53 us)(object id 68038)
         20     TABLE ACCESS BY INDEX ROWID QUEUE_TAB (cr=6032 pr=0 pw=0 time=701 us)
         20      INDEX RANGE SCAN QUEUE_TAB0 (cr=6001 pr=0 pw=0 time=533 us)(object id 68038)
         40       FILTER  (cr=199 pr=0 pw=0 time=2048 us)
         40        INDEX RANGE SCAN QUEUE_TAB_PK (cr=199 pr=0 pw=0 time=1975 us)(object id 68037)

    user599445 wrote:
    Hello Justin and Camille,

    Thank you for taking the time to look at it. I changed the query to correctly practice the ROWNUM. I run and traced the query with the predicate IS NULL and without, with each track below. As you both have suggested that the predicate appears to have no impact on the plan does. All feedback is appeciated.

    Mark,

    the obvious problem with the new plan is that no record is filtered by the first NOT EXISTS clause (using anti-join operation), and then for each line an index seek is performed that filters the records only about 14 000. It is the search for index that takes most of the time, gets consistent since he performs about 2 e/s logic by research, in total nearly 1 million.

    The last 456 000 rows are then sorted (top n) and the top 20 are returned.

    A possible problem could be that the optimizer does not switch mode optimization first_rows_N due to the variable binding used in the filter ROWNUM.

    You can try to execute the statement using a literal (ROWNUM< 21)="" instead="" of="" the="" bind="" variable="" to="" see="" if="" it="" changes="">

    I think in this case, it could be much more effective for the QUEUE_TAB0 of the market index in the order requested and perform the two NOT EXISTS clause as activities of recursive filters provided as your ROWNUM predicate is generally rather low.

    Be aware however that is you do not use a "binary" NLS_SORT index parameter can not be used for an operation of NOSORT ORDER BY STOPKEY of CHAR values, so please check your settings NLS (NLS_SESSION_PARAMETERS. PARAMETER = "NLS_SORT") in which case the optimizer will not use the index for sorting. Note that the NLS parameters are customer specific and can theoretically be different for each session / client.

    You can test this by using a query simple top N: SELECT * FROM (SELECT * ACTION_CODE, ENTITY_TYPE, ENTITY_KEY, QUEUE_TAB ORDER OF PRIORITY) WHERE ROWNUM<>

    If it does not use the QUEUE_TAB0 index to stop the sort operation, you might have a problem with the NLS parameters.

    In order to prevent the transformation of the GUESSED you can also try adding a hint NO_UNNEST two subqueries ("SELECT / * + NO_UNNEST * /...") ("in the respective subquery) and you can also try to switch mode FIRST_ROWS (n) using for example the FIRST_ROWS indicator (20) in the body of the request (but which must be done by the ROWNUM predicate).

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • USE_HASH hint

    Hello

    What happens if this suspicion has the parameter table name?

    Do whatever it is in the following example:

    SELECT / * + INDEX of USE_NL ORDINATE (LM M) USE_HASH (THE) (E Employee_Last_Name)

    INDEX of the INDEX (THE Location_Description) (Employee_Pkey M)

    INDEX (LM Location_Pkey) * /.

    E.First_Name, select, E.Salary, THE. Description,

    M.First_Name, M.Last_Name, LM. Description

    EMPLOYEE E, locations, employee M, LM

    WHERE select = "Johnson".

    AND E.Manager_ID = M.Employee_ID

    AND E.Location_ID = THE. Location_id

    AND M.Location_ID = LM. Location_id

    AND THE. Description = "Dallas".

    Thank you.

    Your index currently looks like this:

    / * + ORDERED USE_NL (LM M) USE_HASH (THE) (Employee_Last_Name E) INDEX (Location_Description) INDEX (M Employee_Pkey) INDEX (LM Location_Pkey) * /.

    tables following, listed in the order they appear in the FROM clause, being the only ones in the query:

    Employees E, locations, employee M, localities LM

    The 'ordered' indicator (that you should avoid using any recent version of Oracle for the indication leading()) means that the optimizer will consider only the join order E M LM, so he joins THE E and M for the result of the join of E and THE, then LM for the result of the join of E, THE and M.

    Use_hash hint tells the optimizerthat when he joined THE the previous join result (which in this case is only table E), it should use a hash join.

    Passing indicator use_nl (M LM) is a little hand for the pair of advice "use_nl (M) use_nl (LM)", which respectively said the optimizer to join M to E result and by using a loop join and nested LM to the result of E THE and M by a nested loop.

    Concerning

    Jonathan Lewis

  • Reg: Error in parallel Hint-

    Hi Experts,

    I have a concern about the use of the parallel hint with DOP = 'AUTO '.

    These errors during the ETL or tasks are performed with / * + PARALLEL (AUTO) * /.

    JOB - 1
    java.sql.SQLException: ORA-12853: insufficient memory for buffers PX: run 1159024K, max necessary K 11666304

    ORA-04031: unable to allocate 65560 bytes of shared memory ('pool', 'unknown object', 'pool', 'Pool of msg PX')


    JOB - 2

    java.sql.SQLException: ORA-12801: error reported in the P256 parallel query server
    ORA-12853: insufficient memory for buffers PX: run 1159024K, max necessary K 11666304
    ORA-04031: unable to allocate 65560 bytes of shared memory ('pool', 'unknown object', 'pool', 'Pool of msg PX')

    I tried google, but could not get a pattern appropriate for that and also correct.

    1-do I need to increase the bound parameter buffer?

    2 - is this 'AUTO' option the cause? And using a DOP = 3, 4, etc. guaranteed to solve this problem?

    (I try this and check but want to know the exact reason, so that it causes no problems in Prod)

    Guidance in this regard.

    -Nordine

    ( on Oracle 11.2.0.3.0 )

    nordine B wrote:

    Before going deep into your words, had a quick question - despite having DOP as 'auto' in the suspicion, why is there an error on the buffers PX?

    I was under the assumption that DOP setting on "automatic", the optimizer will take care of all resources and allocate the CPU threads accordingly. But then why this error is growing?

    First, I already mentioned in my reply what treat buffers "PX": this is the memory that is required for communication between the servers in PX. Parallel execution comes with the need for a communication between the involved process layer and this layer of communication requires memory for exchanging data (and could even cross the interconnection for CARS cross the parallel execution of the instance). If you want to know more about it, you can watch my Webinar: http://allthingsoracle.com/analyzing-and-troubleshooting-oracle-parallel-execution/

    So does not AUTO magic DOP, it is mainly about the following:

    -L' optimizer uses a new method of calculation to arrive at a particular degree of parallelism (DOP). The basics, how is the calculation I have described in my post 'Cost Is Time' mentioned in my previous answer. Since this calculation is based on the estimated costs of the optimizer, it can happen to little all - adapted DOP, or may be a completely inappropriate DOP if the calculation of the underlying costs did not reflect the actual amount of work, or if the calibration i/o returned to the unreasonable values.

    -In addition to this AUTO DOP code still uses other settings / settings / thresholds which can be used to control / limit the calculated value.

    * The PARALLEL_MIN_TIME_THRESHOLD parameter can be used to control which * estimated time * must be exceeded before the parallel execution gets seen by AUTO DOP. Note also that it is based on estimates and therefore underlies the same problems as described above

    * The PARALLEL_DEGREE_LIMIT can be used at the upper limit of the degree of "cap".

    Currently Manager of used consumer resource group data can impose a different ceiling and will be considered in the calculation, too

    -The PARALLEL_SERVERS_TARGET parameter can be used to control the simultaneous execution of running in parallel, resulting in a queue of executions if the threshold is exceeded

    -The calibration of i/o resources provides an important factor which is the main engine for the calculation of the DOP

    -Resource Manager can be used to implement fairly complex scenarios with different queues and the different settings by Consumer Group

    So you can see there are some elements in AUTO DOP that may consider the consumption of resources, especially things of queues and advanced resource manager configurations, but stuff 'Pads PX' does not part of the calculation.

    If you want to learn more about these settings and interaction with the resource manager, follow the links on the page "webinar" above - that it points to several very good articles published on the Oracle 'Data Warehouse' blog, a highly recommended resource if you regularly deal with a running in parallel.

    Randolf

  • Subquery factoring and materialize Hint

    WITH t AS
            (SELECT MAX (lDATE) tidate
               FROM rate_Master
              WHERE     Code = 'G'
                    AND orno > 0
                    AND TYPE = 'L'
                    AND lDATE <= ':entereddate')
    SELECT DECODE (:p1,  'B', RateB,  'S', RateS,  Rate)
      FROM rate_Master, t
     WHERE     Code = 'G'
           AND orno > 0
           AND TYPE = 'L'
           AND NVL (lDATE, SYSDATE) = tidate;
    In the example given the sub query returns just one line because of the max aggregate function. This by making a With clause that will be of any benefit? Also I assume / understand that factoring of subquery would be really useful when we try to do a sub query that returns multiple rows in a clause. Is my right to intrepration?

    Then add the / * + Materialize * / reference to a query with is required or the optimizer itself will do and perform a transformation of the temporary table. In my example, I have to give the hint in the query. Please discuss and help

    Thanks in advance.

    ramarun wrote:

    WITH t AS
    (SELECT MAX (lDATE) tidate
    FROM rate_Master
    WHERE     Code = 'G'
    AND orno > 0
    AND TYPE = 'L'
    AND lDATE <= ':entereddate')
    SELECT DECODE (:p1,  'B', RateB,  'S', RateS,  Rate)
    FROM rate_Master, t
    WHERE     Code = 'G'
    AND orno > 0
    AND TYPE = 'L'
    AND NVL (lDATE, SYSDATE) = tidate;
    

    In the example given the sub query returns just one line because of the max aggregate function. This by making a With clause that will be of any benefit? Also I assume / understand that factoring of subquery would be really useful when we try to do a sub query that returns multiple rows in a clause. Is my right to intrepration?

    Not quite.
    The subquery factoring should be used when you want to use the subquery results more than once in your query. So if you write a regular SQL statement, but find that it is necessary to write the same subquery more than once inside, then you can factor on this subquery using the WITH clause, so that it is executed once, and the results may then be referenced several times in the main query. This is what gives a performance advantage in many cases.

    Then add the / * + Materialize * / reference to a query with is required or the optimizer itself will do and perform a transformation of the temporary table. In my example, I have to give the hint in the query. Please discuss and help

    As mentioned the suspicion of materialization is not documented so should not be used in production code. Personally, I found that it can add significant performance gain of a weighted subquery where this subquery causes a large amount of data. Don't know why the optimizer is not always materialize subqueries by default but... not really looked inside a lot.

  • Get the response time more with First_Rows Hint.

    Hello
    I use 10.2.0.1.0 oracle version. I have a sql query that gives performance with cutting-edge FIRST_ROWS problem.     I expect the best response time with suspicion of "FIRST_ROWS (5)", but his is the worst, with use of a different set of the index, which is local to the partition. Please, help me to understand, the reason behind this change in negative execution path?
         First query gives all the ~3488 rows within ~1 minutes but the query with HINT is taking ~15 minutes for providing initial few rows itself. 
    For second one i am not able to get the exact and estimated cardinality stats , as it was taking lot of time for completion, so providing Autotrace plan only.
         
    Main Query:
    Published by: 930254 on October 15, 2012 04:55

    930254 wrote:
    Yes, Jonathan, in fact in the first case, i 'I' table is being analyzed using an overall index, but suspicion FIRST_ROW sound using the index that is local to the partition. resulting in the digitization of all partitions of 448. I think it's causing bottleneck. Is there something like: FIRST_ROW suspicion that affect this type of systematic index scan?

    In the first case the optimizer has unnested subquery of REACTION and used to bring to the table, I, and that's what dictated the choice of index.

    In the case of first_rows (5) decided that the range index scan will take adequate data if some time he chose a different index - running subqueries in the REACTION as a subquery for filter on each line. But it is the estimate of how long it will find adequate data (and how much time he will have to run the subquery to eliminate unnecessary data) does not.

    Concerning
    Jonathan Lewis

  • Add Hint in Oracle

    Hi all

    Any thoughts on why we get again generated during an insert operation with / * + APPEND * / hint when having the DB in log mode archive. And same statement creation very very less again when the DB is in no fashion journal archive. This is the generation of required redo in LOG ARCHIVE MODE, if yes, how can we achieve a direct path insert into DB in archivelog mode.

    DB: 11.2.0
    OS: Windows XP.
    STMT:

    DB in archive log Mode.
    SQL > insert / * + append * / test
    2. select object_id of x;

    71708 lines were created.


    Statistics
    ----------------------------------------------------------
    217 recursive calls
    Gets 146 db block
    228 compatible Gets
    0 physical reads
    * size of redo 907948 *.
    665 bytes sent via SQL * Net to client
    623 bytes received via SQL * Net from client
    3 SQL * Net back and forth to and from the client
    7 sorts (memory)
    0 sorts (disk)
    71708 rows processed

    DB mode no - Archive Log

    SQL > insert / * + append * / test
    2. select object_id of x;

    71708 lines were created.


    Statistics
    ----------------------------------------------------------
    33 the recursive calls
    149 db block Gets
    compatible 125 Gets
    0 physical reads
    * redo of 3152 size *.
    662 bytes sent via SQL * Net to client
    623 bytes received via SQL * Net from client
    3 SQL * Net back and forth to and from the client
    1 sorts (memory)
    0 sorts (disk)
    71708 rows processed

    Any help would be greatly appreciated.

    Thanks in advance.

    Published by: user8710159 on July 11, 2011 12:40

    On a noarchivelog database, APPEND implies nologging.

    On a database archivelog, APPEND did not involve nologging, but you can still get nologging behavior if you explicitly set NOLOGGING on the table before you start the insertion.

    Hope that helps,

    -Mark

  • What has been the recent initial risk security involving Javascript in Firefox?

    What has been the recent initial risk security involving Javascript in Firefox? I downloaded the suggested "No Script" to be able to allow or forbid scripts on Web sites. However, it gets a little frustrating when waiting for pages to download, then realize that I have to enable them. I really need to make it longer?

    JavaScript is not any security risk known that have not been resolved in recent versions of Firefox. You are thinking maybe Java, which is full of known security holes and should be turned off, but is not related to the Javascript in any way.

  • Unable to group message when an android user is involved

    Also recently there is 6-9 months, I could text of the group with a particular set of contacts, and then all of a sudden my attempts to send texts of this same set of contacts group failed with "unable to deliver.  I stopped receiving their texts of the group.  I tried texting each contact individually and managed.  I tested other contacts and texts of the group, and those who have succeeded as well.  Finally, I have narrowed the problem down to a particular contact that uses an Android device - when this contact is involved in a group text so I can't send or receive messages from this group text.  Other iPhone users are able to text with this contact group - the problem seems to be related to my iPhone.

    Contact Android has never owned an iPhone, so it is not bound in the middle of old iPhone sound that is left behind on Apple iTunes config.

    I tried to remove and re-add that particular contact, remove all my messages, hard, reboot, upgrade to the latest iOS, etc.. Nothing works.  Any suggestion would be appreciated.

    Hi trask77,

    Thank you for using communities Support from Apple!

    It seems that you are having problems with the group with an Android user messaging.  You can find the following articles useful: send a message from your iPhone, iPad or iPod touch - Apple Support Group

    If you cannot send or receive messages on your iPhone, iPad or iPod touch - Apple Support

    In addition, if you have the person using the remove device Android conversation and then start a new group message to see if it allows messages to go through.

    See you soon!

  • MacKeeper - stay dillymanUpd, hint

    Hi guys,.

    Yesterday, my wife downloaded and installed MacKeeper as soon as I got it I got it removed. But the damage has been done... I think so...

    On LittleSnitch, I noticed some weird programs are connecting:

    / Library/dillymanUpd/Contents/MacOS/dillymanUpd

    / Library/hint/Contents/MacOS/hint

    /private/var/tmp/BrowserEnhancer07032016/BrowserEnhancer.app/Contents/MacOS/brow serEnhancer

    Never seen these google search does not know these too... What are my options...

    Thank you

    You have installed one or more variants of the malware ad-injection "VSearch. Please back up all data, and then take the steps below to disable it.

    Do not use any type of product, "anti-virus" or "anti-malware" on a Mac. It is never necessary for her, and relying on it for protection makes you more vulnerable to attacks, not less.

    Malware is constantly evolving to work around defenses against it. This procedure works now, I know. It will not work in the future. Anyone finding this comment a couple of days or more after it was published should look for a more recent discussion, or start a new one.

    VSearch malware tries to hide by varying names of the files it installs. To remove it, you must first identify the naming model.

    1 triple - click on the line below on this page to select, then copy the text to the Clipboard by pressing Control-C key combination:

    /Library/LaunchDaemons

    In the Finder, select

    Go ▹ go to the folder...

    from the menu bar and paste it into the box that opens by pressing command + V. You won't see what you pasted a newline being included. Press return.

    A folder named "LaunchDaemons" can open. If this is the case, press the combination of keys command-2 to select the display of the list, if it is not already selected.

    There should be a column in the update Finder window. Click this title two times to sort the content by date with the most recent at the top. Please don't skip this step. The files that belong to an instance of VSearch will have the same date of change within about a minute, so they will be grouped together when you sort the folder this way, which makes them easy to identify.

    Search in the folder with the name of all these forms:

    com.something.daemon.plist

    com.something.Helper.plist

    com.something .net - preferences.plist

    Here, something is a string, which may be different in each instance of VSearch random meaningless. So far it has always been an alphanumeric string without punctuation signs, such as "disbalance" or "thunderbearer."

    You may have more than one copy of the malware, with different values of something.

    There may be one or more files with the name of this form:

    com.somethingelseUpd.plist

    where George can be an empty string of sense that something different. Yet once, there may be more than one file of this type, with different values of Gisele.

    Here is a typical example of an infection VSearch:

    com.disbalance .net - preferences.plist

    com.thunderbearerUpd.plist

    You will have files with similar names, but probably not identical to these.

    If you feel confident that you have identified the files above, drag only the files - nothing - to the trash. You may be prompted for administrator login password. Close the Finder window.

    2. open this folder as in step 1:

    /Library/LaunchAgents

    Move to the trash all the files with the name of the form

    com.something.agent.plist

    where something is one of the strings that you found in step 1. There may be not all of these files.

    3. If you have whatever it is moved to the trash in step 1 and step 2, restart the computer and empty the trash.

    Do not remove the folder 'LaunchAgents' or "LaunchDaemons", or anything else inside of one or the other, unless you know you have another type of unwanted software and more VSearch. Records are a normal part of Mac OS X. The terms "agent" and "demon" is a reference to a program that starts automatically. This is not inherently bad, but the mechanism is sometimes exploited by hackers for malicious software.

    4 reset the home page in each of your browsers, if it has been modified. In Safari, first load the desired home page, then select

    ▹ Safari preferences... ▹ General

    and click on

    Set on the current Page

    The malware is now permanently inactivated, as long as you reinstall it never. A few small files will be left behind, but they have no effect, and trying to find all them is more trouble that it's worth.

    5. If you do not find the files or you are not sure about the identification, after what you have found.

    If in doubt, or if you have no backups, change nothing at all.

    6. the penalty may have started when you have downloaded and run an application called 'MPlayerX' or "PDF Pronto." If there is an element with a name in the Applications folder, delete it.

    This Trojan horse is often found on the illegal Web sites that traffic in content such as movies pirated. If you, or anyone else who uses the computer, visit these Web sites and follow the instructions to install the software, you can expect more of the same and worse, to follow. Never install software that you downloaded from a bittorrent, or which has been downloaded by someone else from an unknown source.

    In the aspect of security & confidentiality of system preferences, select the general tab. The marked anywhere radio button should not be selected. If this is the case, click the lock icon to unlock the settings, and then select an other keys. After that, do not ignore a warning that you are about to run or install an application from an unknown Director.

    Then, still in system preferences, open the pane of the App Store or software update and check the box marked

    Install the system data files and security updates (OS X 10.10 or later version)

    or

    Automatically download the updates (OS X 10.9 or earlier version)

    If it is not already done.

  • Function of "-non-piste" involves cookies set by the web site?

    The feature '-not-track ' Firefox 5 involves the use of cookies? In other words, websites that decide to honor the '-not-track ' will push a Firefox cookie that indicates my preference, for every time I visit this web site?

    I ask this question because I use the management of cookies. For most websites, I put "Allow for session" cookies, but when I see a cookie named "Tracking" or "Metrics" I put these cookies 'decline '. Therefore, I wonder if my management of cookies is defeated at the intended function of the '-non-filiere ' imagined by Mozilla.

    I mean, in simple terms how is '-non-piste ' supposed to work? How do I know if it works?

    If this has already been explained elsewhere please direct me to this article/document.

    Thank you.

    Firefox sends a DNT = 1 response header to the server.

    This is the server to decide what to do with this request.

  • Since the installation of the latest version of 4.0b12, I am unable to connect to any https through a proxy site. Connection works if no proxy is involved, with the proxy, I get a message like "proxy refuses the connection". Thank you for your answer

    I am connected to the network of the client and I should use a proxy.
    I successfully authenticate to the proxy and I try to access https://mail.google.com.
    I get a message that the proxy refuses the connection.
    I noticed that this happens with all https sites.
    If I connect with my mobile internet stick without proxy, I am able to connect: the combination of proxy and https is a failure.
    Other computers on the same network with different browsers can connect to https via the proxy.

    I work with the development of Firefox on this team. As far as I know, they seem to think that there are 2 or 3 different with the same symptoms or very similar problems, all involving proxies. They think that they have set their all for RC1.

    Right now, it seems that we just want to test an early version.

    You can get that here:

    http://ftp.mozilla.org/pub/mozilla.or.../Firefox-4.0b13pre.en-US.Win32.installer.exe

    Install this somewhere (not in your current installation directory), quit all instances of Firefox and try it. I would like to know if it works.

  • How to turn off the hint (to save the battery?)

    I found that even when you take advice from your ear, it consumes battery quite quickly. My index was flat about 8-9 hours later, even though she was just sitting on the table. How long should take when it is lying on the desk? Is it possible to cut further? I think that it is because Hint arrived new out of the box, that it is 'off', but after just a second to load through the case, I took it out and he said "more than 3 hours of talk time"

    Hi jonstatt,

    in order to disable the suspicion of the bike, you just put it in its case. The maximum waiting time is 100 hours.

    Fabio

  • How involved funciton works?

    How involved funciton works when using digital controls?


Maybe you are looking for