When oracle uses a nested loop join full?

Hello!

Oracle database uses a complete nested loop join? I mean, imagine 2 tables without any index... is there a case where Oracle made a full scan of the inner table for each row in the outer table? I know it's the original algorithm of the nested loop join, but some databases prefer to do a temp table to autoindex the internal table and never does a full scan of the inner table...

Thank you!!

http://download.Oracle.com/docs/CD/B10501_01/server.920/a96533/optimops.htm#49548

is 100% clear in its language. Simply click on it.
A nested loop join involves the following steps:

The optimizer determines the driving table and it designates as the outer table.
The other table is referred to as the inner table.
For each row in the outer table, Oracle access all rows from the inner table. The outer loop is for each row in the outer table, and the inner loop is for each line of the internal table. The outer loop appears before the inner loop in the execution plan, as follows:
NESTED LOOPS
outer_loop
inner_loop

Concerning
Girish Sharma

Tags: Database

Similar Questions

  • The images appear tense when played using the slide show in full screen

    The images appear tense when played using the slide show in full screen in Windows Vista Basic. That means that a picture of resolution 1920 x 1200 appears full screen covering although a 1920 x 1080 image seems letterbox in fullscreen. My screen resolution was put to the native resolution of 1920 x 1080. It is clear that this slide show program only keeping the proportions of the image. Earlier this problem wasn't there. I think that the slide show program addresses in such a way that my monitor could have 16:10 display of report resolution l / h. thanks for giving me a solution.

    This happens usually when the image resolution is high.

    Keep your screen resolution of 1024 x 768 and it should work fine.

  • Must use the nested left join syntax?

    I am currently an editing view. The view has one with a followed left join to an inner join such as this:

    Select
    T1.a,
    T2.b,
    T3.c
    Of
    (select 1 as a Union double all the)
    Select 2 as double
    ) t1
    left join
    (select 1A, 11 b of all the double union)
    Select 2A, 12 b of the double
    ) t2
    on t1.a = t2.a
    Join
    T3 (select 11 b, 14-c double)
    on t2.b = t3.b;
    / * - Try out: -.
    A, B AND C
    ------- ------- -------
    1-11-14
    */

    The inner join converts left join in an inner join "de facto"? should I use nested join syntax in order to get the other ranks:

    Select
    T1.a,
    T2.b,
    T3.c
    Of
    (select 1 as a Union double all the)
    Select 2 as double
    ) t1
    left join
    (select 1A, 11 b of all the double union)
    Select 2A, 12 b of the double
    ) t2
    on t1.a = t2.a
    Join
    T3 (select 11 b, 14-c double)
    on t2.b = t3.b;
    / * - Try out: -.
    A, B AND C
    ------- ------- -------
    1-11-14
    */

    Sorry, just saw your last join condition now:

    on t2.b = t3.b;
    

    This results in a JOIN INTERNAL to the EXTERNAL table JOINED to, will certainly lead to a result of diminshed set - not quite the same that forced an INNER JOIN, but the result is the same, Yes. So there are indeed of equivalence.

    This, however, would not have resulted a reduced resultset:

    on t1.a = t3.a;
    

    But of course it is not possible, since the t3 has a column "a".

  • How you see the progression when you use a ForEach loop?

    Hello

    I have a table with about 100 containers in it. My main thread uses a ForEach with an internal structure dealing with six opportunities. My previous program had all the steps in a very long list, run one by one. I find this new approach is much more pleasant to look at and easier to change, but it is not really no way to tell at what point along the test is (unless you know it by heart). In the approach of the long list, you could see all the results/success made and how much remained, now there is no way to tell.

    A few tips to make some sort of indication of progress?

    As ObjectReference parameter, you must use 'nothing '. The last parameter (alternator?), you can choose true or false. Please see the documentation for PostUIMessageEx for more information.

    The numeric parameter should be between 0 and 100. Since this is "Progress per cent", it is logical, it?

    The status bar has several components, one for example display the connected to the user or the used process template. The pane on the right side mostly shows the percentage of progress if used in your sequence.

    Reports by default, again, includes this feature. So if you have a sequence with for example 500 steps, the report "will be a visible progress" in this pane (with less than 100 steps, it's often too fast to see). Do not forget that the sequence editor of NOR and full featured Interfaces have this feature, the chart Simple interface is not.

    Norbert

  • Set of characters not supported when the use of convert and join

    Take the following tables:
    --------------------------------------------------------
    --  DDL for Table TEST_ASSOCIATION
    --------------------------------------------------------
    
      CREATE TABLE "TEST_ASSOCIATION" 
       (     "PARENT_ID" VARCHAR2(20 BYTE), 
         "CHILD_ID" VARCHAR2(20 BYTE)
       ) ;
    --------------------------------------------------------
    --  DDL for Table TEST_OBJECT
    --------------------------------------------------------
    
      CREATE TABLE "TEST_OBJECT" 
       (     "ID" NUMBER, 
         "NAME" VARCHAR2(20 BYTE)
       ) ;
    Now this query works perfectly:
    select * from test_object t_o
    where convert(t_o.name, 'US7ASCII') like '%a%'
    And it does not (error ORA-01482):
    select * from test_object t_o
    where
    exists (
      select * from test_association t_a
      inner join test_object t_o2
      on t_a.parent_id = t_o2.id
      where t_o2.id = t_o.id
    )
    and convert(t_o.name, 'US7ASCII') like '%a%'
    I suspect that the inner query corrupts the CONVERT function, which makes it fail.

    Like all the world encountered something like that? Is it possible to fix this?

    Hello Alex,.

    Could be a variant of bug 4686909.

    First reported in 10.2.0.1 and fixed the 11.0.0.0

    Bug text:

    The following SELECT statement fails with ORA-1482:

    Select d1.dummy
    double D1
    where
    D1. In dummy (select Max (1) double D2 where d2.dummy = d1.dummy)
    and convert (d1.dummy, 'al32utf8') = 'k '.

    -L' error ORA-1482 reproduced if we use a MAX or MIN function, but not if
    other functions, for example, lower, upper, to_char, to_number serve
    -L' error ORA-1482 does not reproduce if the subquery is not a correlation
    subquery
    -L' error ORA-1482 reproduced for any destination character set used in
    the convert function

    Release notes:

    Convert function used anywhere except the selection list has been to launch error-1482

    There is a similar bug, bug 4746930, which suggests a work around:

    WORKAROUND SOLUTION:

    using CURSOR_SHARING = TRUE

    Concerning
    Peter

  • SDO_RELATE slow when you use the Group of... Help, please!

    Hi all

    I'm pretty new on the space side of Oracle please go easy on me.

    I have 2 tables (a and b), each containing line geometries. There is a one (a) to many (b) relationship between the two.

    I want to write a query that selects the information of table b where geometries in table b are fully covered by the geometries in the table has, but the return info is grouped by rows in table a.

    Here is my code:

    Select
    a.Route_ID,
    a.Step,
    Max (b.gritter_status),
    Sum (b.salt_usage)
    Of
    tbl_routedirs a, tbl_routelinks b
    where
    a.Route_ID = b.route_id and
    sdo_covers (a.geoloc, b.geoloc) = 'TRUE '.
    Group
    a.Route_ID, a.step

    The application is extremely slow, taking up to 15 minutes to run... The thing that confuses me is the group by clause of the statement runs in less than half a second.

    I checked all the indexes, etc - are all valid. I tried to re - order tables in the clause that ive read it can be a factor and certainly I have little knowledge about what to Exchange where but it seemed to have no impact on speed.

    Any suggestions would be warmly welcome... Thank you.

    Published by: user8760008 on August 27, 2009 07:08 - I copied the script and do not add functions of aggregation on the selected columns...

    If this is the case, please try:

    Select / * + leading (a) use_nl (a and b) index (your_index_on_b.geoloc b) * /.
    a.Route_ID,
    a.Step,
    Max (b.gritter_status),
    Sum (b.salt_usage)
    Of
    tbl_routedirs a, tbl_routelinks b
    where
    a.Route_ID = b.route_id and
    sdo_coveredby (b.geoloc, a.geoloc) = 'TRUE '.
    Group
    a.Route_ID, a.step

    that is to have nested loops join, then take a small table as external.
    Note that you should not all three tips to get the nested loops join plan.

  • How to quit the nested loop

    I have a nested loop

    loop1 start
    ...
    loop2 start
    ...
    end loop2
    ...
    end loop1

    I want to know how can I come out the two loops of the inner loop.

    Hello
    Out of the inner loop in the use of nested loops labels

    SQL> BEGIN
      2          <>
      3            FOR i IN 1..2 LOOP
      4                 <>
      5                 FOR j IN 1..4 LOOP
      6                      DBMS_OUTPUT.PUT_LINE('I am in Inner Loop');
      7                 END LOOP inner;
      8       DBMS_OUTPUT.PUT_LINE('I am in outer Loop');
      9            END LOOP outer;
     10   END;
     11   /
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in outer Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in outer Loop
    
    PL/SQL procedure successfully completed.
    
    SQL> BEGIN
      2          <>
      3            FOR i IN 1..2 LOOP
      4                 <>
      5                 FOR j IN 1..4 LOOP
      6                      DBMS_OUTPUT.PUT_LINE('I am in Inner Loop');
      7       exit inner;
      8                 END LOOP inner;
      9       DBMS_OUTPUT.PUT_LINE('I am in outer Loop');
     10            END LOOP outer;
     11   END;
     12   /
    I am in Inner Loop
    I am in outer Loop
    I am in Inner Loop
    I am in outer Loop
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> BEGIN
      2          <>
      3            FOR i IN 1..2 LOOP
      4                 <>
      5                 FOR j IN 1..4 LOOP
      6                      DBMS_OUTPUT.PUT_LINE('I am in Inner Loop');
      7       exit outer;
      8                 END LOOP inner;
      9       DBMS_OUTPUT.PUT_LINE('I am in outer Loop');
     10            END LOOP outer;
     11   END;
     12   /
    I am in Inner Loop
    
    PL/SQL procedure successfully completed.
    

    Twinkle

  • use OPT_ESTIMATE or CARDINALITY tip for correct estimation of nested loops

    I'm using Oracle 11.2.0.3.  Below the execution below plan, how can I use tip OPT_ESTIMATE or CARDINALITY to teach optimization E-lines for ID 9 (Nested Loop) 30553 instead of 6.

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                                   | Name                        | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time   | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                            |                             |      1 |        |       |  4604 (100)|          |  30553 |00:00:02.56 |     208K|       |       |          |
    |   1 |  SORT ORDER BY                              |                             |      1 |      6 |  7044 |  4604   (1)| 00:01:05 |  30553 |00:00:02.56 |     208K|    41M|  2086K|   36M (0)|
    |*  2 |   HASH JOIN OUTER                           |                             |      1 |      6 |  7044 |  4603   (1)| 00:01:05 |  30553 |00:00:02.10 |     208K|    38M|  3120K|   39M (0)|
    |*  3 |    HASH JOIN OUTER                          |                             |      1 |      6 |  6870 |  4599   (1)| 00:01:05 |  30553 |00:00:01.97 |     208K|    38M|  3120K|   39M (0)|
    |*  4 |     HASH JOIN OUTER                         |                             |      1 |      6 |  6744 |  4591   (1)| 00:01:05 |  30553 |00:00:01.85 |     208K|    37M|  3121K|   39M (0)|
    |*  5 |      HASH JOIN OUTER                        |                             |      1 |      6 |  6570 |  4584   (1)| 00:01:05 |  30553 |00:00:01.74 |     208K|    37M|  3121K|   38M (0)|
    |*  6 |       HASH JOIN OUTER                       |                             |      1 |      6 |  6414 |  4576   (1)| 00:01:05 |  30553 |00:00:01.60 |     208K|    37M|  3121K|   38M (0)|
    |   7 |        NESTED LOOPS                         |                             |      1 |        |       |            |          |  30553 |00:00:01.44 |     208K|       |       |          |
    |   8 |         NESTED LOOPS                        |                             |      1 |      6 |  6318 |  4572   (1)| 00:01:05 |  30553 |00:00:01.31 |     182K|       |       |          |
    |   9 |          NESTED LOOPS                       |                             |      1 |      6 |  1830 |  4568   (1)| 00:01:04 |  30553 |00:00:01.11 |     124K|       |       |          |
    |* 10 |           HASH JOIN                         |                             |      1 |   2069 |   270K|  2499   (1)| 00:00:35 |  30646 |00:00:00.46 |   23738 |  6539K|  2033K| 7965K (0)|
    |* 11 |            TABLE ACCESS BY INDEX ROWID      | DSCLR                       |      1 |   5079 |   158K|   533   (1)| 00:00:08 |  91395 |00:00:00.28 |    6460 |       |       |          |
    |  12 |             BITMAP CONVERSION TO ROWIDS     |                             |      1 |        |       |            |          |    197K|00:00:00.16 |     615 |       |       |          |
    |  13 |              BITMAP AND                     |                             |      1 |        |       |            |          |      4 |00:00:00.14 |     615 |       |       |          |
    |  14 |               BITMAP OR                     |                             |      1 |        |       |            |          |      4 |00:00:00.07 |     276 |       |       |          |
    |  15 |                BITMAP CONVERSION FROM ROWIDS|                             |      1 |        |       |            |          |      2 |00:00:00.02 |      69 |       |       |          |
    |* 16 |                 INDEX RANGE SCAN            | XIF913DSCLR                 |      1 |    274K|       |    14   (0)| 00:00:01 |  68407 |00:00:00.01 |      69 |       |       |          |
    |  17 |                BITMAP CONVERSION FROM ROWIDS|                             |      1 |        |       |            |          |      4 |00:00:00.05 |     207 |       |       |          |
    |* 18 |                 INDEX RANGE SCAN            | XIF913DSCLR                 |      1 |    274K|       |    42   (0)| 00:00:01 |    209K|00:00:00.03 |     207 |       |       |          |
    |  19 |               BITMAP CONVERSION FROM ROWIDS |                             |      1 |        |       |            |          |      5 |00:00:00.06 |     339 |       |       |          |
    |* 20 |                INDEX RANGE SCAN             | XIF910DSCLR                 |      1 |    274K|       |    67   (0)| 00:00:01 |    239K|00:00:00.04 |     339 |       |       |          |
    |  21 |            NESTED LOOPS                     |                             |      1 |        |       |            |          |  21749 |00:00:00.10 |   17278 |       |       |          |
    |  22 |             NESTED LOOPS                    |                             |      1 |   3404 |   339K|  1965   (1)| 00:00:28 |  22772 |00:00:00.03 |    1246 |       |       |          |
    |  23 |              TABLE ACCESS FULL              | TMP_RPT_BD_STATE_DATA_DWNLD |      1 |   3255 |   257K|    11   (0)| 00:00:01 |   3255 |00:00:00.01 |      27 |       |       |          |
    |* 24 |              INDEX RANGE SCAN               | XIE2OCRN                    |   3255 |      7 |       |     1   (0)| 00:00:01 |  22772 |00:00:00.03 |    1219 |       |       |          |
    |* 25 |             TABLE ACCESS BY INDEX ROWID     | OCRN                        |  22772 |      1 |    21 |     1   (0)| 00:00:01 |  21749 |00:00:00.06 |   16032 |       |       |          |
    |* 26 |           VIEW PUSHED PREDICATE             |                             |  30646 |      1 |   171 |     1   (0)| 00:00:01 |  30553 |00:00:00.63 |     101K|       |       |          |
    |  27 |            WINDOW BUFFER                    |                             |  30646 |      1 |    21 |     1   (0)| 00:00:01 |  46946 |00:00:00.59 |     101K|  2048 |  2048 | 2048  (0)|
    |* 28 |             TABLE ACCESS BY INDEX ROWID     | DSCLR_FLNG                  |  30646 |      1 |    21 |     1   (0)| 00:00:01 |  46946 |00:00:00.32 |     101K|       |       |          |
    |* 29 |              INDEX RANGE SCAN               | XIE1DSCLR_FLNG              |  30646 |      2 |       |     1   (0)| 00:00:01 |  46946 |00:00:00.21 |   59862 |       |       |          |
    |* 30 |          INDEX RANGE SCAN                   | XPKH760_RGLTY_ACTN_DSCLR    |  30553 |      1 |       |     1   (0)| 00:00:01 |  30553 |00:00:00.18 |   57541 |       |       |          |
    |  31 |         TABLE ACCESS BY INDEX ROWID         | H760_RGLTY_ACTN_DSCLR       |  30553 |      1 |   748 |     1   (0)| 00:00:01 |  30553 |00:00:00.11 |   26218 |       |       |          |
    |  32 |        TABLE ACCESS FULL                    | DSCLR_ST_TYPE_TBL           |      1 |      4 |    64 |     4   (0)| 00:00:01 |      4 |00:00:00.01 |       5 |       |       |          |
    |  33 |       TABLE ACCESS FULL                     | RGLTY_RSLTN_TYPE_TBL        |      1 |     12 |   312 |     7   (0)| 00:00:01 |     12 |00:00:00.01 |      10 |       |       |          |
    |  34 |      TABLE ACCESS FULL                      | INTTR_TYPE_TBL              |      1 |     14 |   406 |     7   (0)| 00:00:01 |     14 |00:00:00.01 |      10 |       |       |          |
    |  35 |     TABLE ACCESS FULL                       | SNCTN_TYPE_TBL              |      1 |     15 |   315 |     7   (0)| 00:00:01 |     15 |00:00:00.01 |      10 |       |       |          |
    |  36 |    TABLE ACCESS FULL                        | PRDCT_TYPE_TBL              |      1 |     25 |   725 |     4   (0)| 00:00:01 |     25 |00:00:00.01 |       5 |       |       |          |
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Query Block Name / Object Alias (identified by operation id):
    -------------------------------------------------------------
    
       1 - SEL$A8B7A3F4
      11 - SEL$A8B7A3F4 / [email protected]$13
      23 - SEL$A8B7A3F4 / [email protected]$1
      24 - SEL$A8B7A3F4 / [email protected]$13
      25 - SEL$A8B7A3F4 / [email protected]$13
      26 - SEL$13512960 / [email protected]$13
      27 - SEL$13512960
      28 - SEL$13512960 / [email protected]$14
      29 - SEL$13512960 / [email protected]$14
      30 - SEL$A8B7A3F4 / [email protected]$2
      31 - SEL$A8B7A3F4 / [email protected]$2
      32 - SEL$A8B7A3F4 / [email protected]$9
      33 - SEL$A8B7A3F4 / [email protected]$11
      34 - SEL$A8B7A3F4 / [email protected]$3
      35 - SEL$A8B7A3F4 / [email protected]$5
      36 - SEL$A8B7A3F4 / [email protected]$7
    
    Outline Data
    -------------
    
      /*+
          BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('11.2.0.3')
          DB_VERSION('11.2.0.3')
          OPT_PARAM('optimizer_index_cost_adj' 20)
          ALL_ROWS
          OUTLINE_LEAF(@"SEL$13512960")
          PUSH_PRED(@"SEL$A8B7A3F4" "DF"@"SEL$13" 11)
          OUTLINE_LEAF(@"SEL$A8B7A3F4")
          ELIMINATE_JOIN(@"SEL$2D47CDEA" "DTT"@"SEL$13")
          OUTLINE(@"SEL$14")
          OUTLINE(@"SEL$A8B7A3F4")
          ELIMINATE_JOIN(@"SEL$2D47CDEA" "DTT"@"SEL$13")
          OUTLINE(@"SEL$2D47CDEA")
          MERGE(@"SEL$3FAACB6D")
          OUTLINE(@"SEL$15")
          OUTLINE(@"SEL$3FAACB6D")
          MERGE(@"SEL$11")
          MERGE(@"SEL$A1A6E401")
          OUTLINE(@"SEL$12")
          OUTLINE(@"SEL$11")
          OUTLINE(@"SEL$A1A6E401")
          MERGE(@"SEL$9")
          MERGE(@"SEL$BFB1842A")
          OUTLINE(@"SEL$10")
          OUTLINE(@"SEL$9")
          OUTLINE(@"SEL$BFB1842A")
          MERGE(@"SEL$7")
          MERGE(@"SEL$EEDE2B8C")
          OUTLINE(@"SEL$8")
          OUTLINE(@"SEL$7")
          OUTLINE(@"SEL$EEDE2B8C")
          MERGE(@"SEL$5")
          MERGE(@"SEL$A6B38458")
          OUTLINE(@"SEL$6")
          OUTLINE(@"SEL$5")
          OUTLINE(@"SEL$A6B38458")
          MERGE(@"SEL$171BE69E")
          MERGE(@"SEL$3")
          OUTLINE(@"SEL$4")
          OUTLINE(@"SEL$171BE69E")
          MERGE(@"SEL$AF02BF1E")
          OUTLINE(@"SEL$3")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$AF02BF1E")
          MERGE(@"SEL$13")
          OUTLINE(@"SEL$1")
          OUTLINE(@"SEL$13")
          FULL(@"SEL$A8B7A3F4" "OH"@"SEL$1")
          INDEX(@"SEL$A8B7A3F4" "O"@"SEL$13" ("OCRN"."ORG_PK" "OCRN"."DSCLR_DSCLB_FL" "OCRN"."DSCLR_RPTBL_FL"))
          BITMAP_TREE(@"SEL$A8B7A3F4" "D"@"SEL$13" AND(OR(1 1 ("DSCLR"."FORM_TYPE_CD") 2 ("DSCLR"."FORM_TYPE_CD")) ("DSCLR"."DSCLR_TYPE_CD")))
          NO_ACCESS(@"SEL$A8B7A3F4" "DF"@"SEL$13")
          INDEX(@"SEL$A8B7A3F4" "H7"@"SEL$2" ("H760_RGLTY_ACTN_DSCLR"."FLNG_PK" "H760_RGLTY_ACTN_DSCLR"."DSCLR_PK" "H760_RGLTY_ACTN_DSCLR"."REC_SEQ_NB"))
          FULL(@"SEL$A8B7A3F4" "DS"@"SEL$9")
          FULL(@"SEL$A8B7A3F4" "RST"@"SEL$11")
          FULL(@"SEL$A8B7A3F4" "ITT"@"SEL$3")
          FULL(@"SEL$A8B7A3F4" "ST"@"SEL$5")
          FULL(@"SEL$A8B7A3F4" "PT"@"SEL$7")
          LEADING(@"SEL$A8B7A3F4" "OH"@"SEL$1" "O"@"SEL$13" "D"@"SEL$13" "DF"@"SEL$13" "H7"@"SEL$2" "DS"@"SEL$9" "RST"@"SEL$11" "ITT"@"SEL$3" "ST"@"SEL$5" "PT"@"SEL$7")
          USE_NL(@"SEL$A8B7A3F4" "O"@"SEL$13")
          NLJ_BATCHING(@"SEL$A8B7A3F4" "O"@"SEL$13")
          USE_HASH(@"SEL$A8B7A3F4" "D"@"SEL$13")
          USE_NL(@"SEL$A8B7A3F4" "DF"@"SEL$13")
          USE_NL(@"SEL$A8B7A3F4" "H7"@"SEL$2")
          NLJ_BATCHING(@"SEL$A8B7A3F4" "H7"@"SEL$2")
          USE_HASH(@"SEL$A8B7A3F4" "DS"@"SEL$9")
          USE_HASH(@"SEL$A8B7A3F4" "RST"@"SEL$11")
          USE_HASH(@"SEL$A8B7A3F4" "ITT"@"SEL$3")
          USE_HASH(@"SEL$A8B7A3F4" "ST"@"SEL$5")
          USE_HASH(@"SEL$A8B7A3F4" "PT"@"SEL$7")
          SWAP_JOIN_INPUTS(@"SEL$A8B7A3F4" "D"@"SEL$13")
          INDEX_RS_ASC(@"SEL$13512960" "DF1"@"SEL$14" ("DSCLR_FLNG"."DSCLR_PK" "DSCLR_FLNG"."BLLBL_FL"))
          END_OUTLINE_DATA
      */
    

    This plan gives you an idea of why your initial synchronization has been long - most of your readings are one-piece readings and you have read 53 724 blocks. If you estimate 1 centisecond by read (which could be on a reasonable charge system) then it is 537 seconds. to 5 milliseconds per read, it's still 268 seconds or 4 minutes and 30 seconds.

    A quick break down of some (the worst case) potential time - only you can say whether or not some of these readings will be always/often/never being cached in the file or at the SAN level.

    Line 11 - physical reads 6 400 done - it's a tree bitmap then the readings are in the order of physical table with no. rereads. Call 5ms by read-online 32 seconds. L

    | * 11 |            TABLE ACCESS BY INDEX ROWID | DSCLR                       |      1.   5079.   158K |   533 (1) | 00:00:08 |  91395 | 00:00:01.27 |    6460.   6400 |       |       |          |

    The hash join takes us from 6 400 to 11 788 because it joins, lines 21 to 25 (nested loop) in which most of the work is the random access table with some automatic caching: 26 seconds. Do a search here rather than indexed 22 000 access? Which would be faster, which would charge less.

    | * 25.             TABLE ACCESS BY INDEX ROWID | OCRN                        |  22050.      1.    21.     1 (0) | 00:00:01 |  21059 | 00:01:04.74 |   15634 |   5280.       |       |          |

    Three nested loops that introduce more readings:

    11788 9-> 26386:14 600 of the predicate view pushed which some lies but a very large index and a table of random access 73 seconds

    8 26386-> 33783:7 400 index line 30 - big clue about 37 seconds Access hides

    33783 7-> 53691:19 900 31 table access - large table line, not much caching, 100 seconds.

    In each case, you can ask if an analysis would take less time than all of these random reads.

    NOTE - all I'm pointing our here where you potentially use a lot of time so that you can ask whether or not you should do little of the query in this way, or if there is an alternative, or if the work you're doing is absolutely necessary. If you want to optimize the query you should consider the intent of the query and think your way through a reasonable join order to see if you can imagine an effective way to get the same data. I have written a few articles and presentation on an approach that begins by drawing - here is a link to an article I wrote for a group of SQL Server: https://www.simple-talk.com/sql/performance/designing-efficient-sql-a-visual-approach/

    and a video I did with Kyle Hailey, while he was working for Embarcadero:Tune in for the ultimate SQL Tune-off | Landing pages

    Concerning

    Jonathan Lewis

  • Join external condition bug/feature when you use a RC?

    First I picked up on this bug/feature in an article in the blog of Armstrong ([http://learndiscoverer.blogspot.com/2008/05/using-case-to-solver-outer-join-issues.html])

    It seems that when you use an OR condition in Disco as well as 10 g, it ignores the join on the table conditions...

    I've included the two reports the SQL code to illustrate my point:

    Here is the SQL code generated when I agree with the point of view, you will notice the outer join (i.e. "(+)" ")
    SELECT O100288. UNIQUE_ID, O100291. UNIQUE_ID
    OF ODSTHING. TABLE1: O100288, ODSTHING. O100291 FROM TABLE2
    WHERE ((O100291. UNIQUE_ID = O100288. UNIQUE_ID (+)))
    ;

    Here's what happens if I simply add that a condition is not null. Notice the outer join on the 'IS NOT NULL' which allows to do nothing
    SELECT O100288. UNIQUE_ID, O100291. UNIQUE_ID
    OF ODSTHING. TABLE1: O100288, ODSTHING. O100291 FROM TABLE2
    WHERE ((O100291. UNIQUE_ID = O100288. UNIQUE_ID (+))) AND (O100288. UNIQUE_ID (+) IS NOT NULL)
    ;

    This is what happens when I have AND the same condition with himself, he remains outside joined
    SELECT O100288. UNIQUE_ID, O100291. UNIQUE_ID
    OF ODSTHING. TABLE1: O100288, ODSTHING. O100291 FROM TABLE2
    WHERE ((O100291. UNIQUE_ID = O100288. UNIQUE_ID (+))) AND (((O100288. UNIQUE_ID (+) IS NOT NULL AND O100288. UNIQUE_ID (+) IS NOT NULL)))
    ;+

    Here's what happens if I have the same CONDITION with himself. MAGIC! The outer join disappears!
    SELECT O100288. UNIQUE_ID, O100291. UNIQUE_ID
    OF ODSTHING. TABLE1: O100288, ODSTHING. O100291 FROM TABLE2
    WHERE ((O100291. UNIQUE_ID = O100288. UNIQUE_ID (+))) AND (((O100288. UNIQUE_ID IS NOT NULL OR O100288. UNIQUE_ID IS NOT NULL)))
    ;

    Is it the way it is supposed to work? If it is then I don't see any trace of it in the documentation ([http://download.oracle.com/docs/html/B13915_04/conditions.htm])

    Is it just a useful bug?

    What people think about its use?

    Published by: user4404031 on Sep 12, 2008 08:23

    Hello

    It is documented (http://download.oracle.com/docs/html/B13916_04/conditions.htm#sthref854) that the discoverer does not use outer joins with IN and OR conditions. But the implications of this are not stated. The documentation never tries to explain the underlying SQL.

    Rod West

  • When youtube ask me if I used to open the video full screen, I press none by mistike and save it the mozilla and now I can't open full screen more, what to do

    When youtube ask me if I used to open the video full screen, I press none by mistike and save it the mozilla and now I can't open full screen more, what to do

    Hello ronbn1, while you are on youtube.com, make a right click on a blank spot on the page, go to view page info > permissions and re - activate the approval of full screen in the list.

  • When I use Firefox to display Oracle WebLogic EM, Firefox will not display the scroll bar on some pages. But Google Chrome.

    It is a problem specific to Oracle Web Logic EM.

    In our society, we use the logical Web as a basis for the application server.

    In the EM logic web server, users can use a Web Logic EM (EM is a portal to view processes on Web Logic application) to verify the data.

    I found when I use EM to check online XML, sometimes the page does not appear the scroll bar.

    If I use Google Chrome or Opera, and do the same thing, the page will display scroll bar.

    But I need Firefox because it is my main browser.

    How to overcome this issues?
    And how to prove?

    Hello, cor - el

    Please, please read this thread first:
    https://support.Mozilla.org/en-us/questions/976345

    I found there is that some people have the same problems.

    I check the data of the source code viewer, the data displayed are "pure XML.

    So my question is "pop-up windows display XML data in Firefox.

    I searched the KB and found an expert suggests a whole 'dom.disable_window_open_feature.scrollbars', 'true '.

    This solution not solve my problem.

    And thank you once again, cor - el.

    I can give up google chrome forever.

  • I can only access buttons of menu on the first line when I use mode full-screen, why?

    Many Web sites I visit have on the first line of the web page in a series of menu options that do not respond when I move the mouse to select options. If I use the mode full screen these buttons work correctly. These buttons work correctly when I use IE or Chrome. I am running Windows 7 and this has happened in the last two weeks.

    Recently, the extension of the Yahoo! toolbar and the extension of Babylon have been reported to cause a problem like that. Disable or uninstall the modules.

       * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    
  • Tecra M5 - crashes when you use the docking station - fan at full power but no start the thread

    Hi all

    As I say, I have intermittent problems where the machine crashes when you use the docking station. Sometimes at the beginning of the startup of windows then stalls and powers of fan at full power. If I take off the base of the machine, it works fine.

    I bought this machine because I had one in my previous job and he had found great. However, my only previous also had this problem sometimes when lashing...

    Any assistance received very warmly.

    Thank you!

    Hello

    Stand by. You have noticed this behavior when the laptop is OFF, connect to the docking station and after doing this you turn. Am wrong me or have I misunderstood something?

    Maybe's external screen connected to the docking station?

  • Need help for the conversion of the nested loops to use the stream

    I'm trying to teach me how to effectively use the java stream, but finds it difficult to find the correct syntax for a problem of nested loop. I would like to convert the following code to use the Java 8 stream instead of nested loops.  Can anyone provide an example or a solution?

     /**
         * Return all members of stringListOne that begin with any of the strings in
         * stringListTwo
         *
         * @return all members of stringListOne that begin with any of the strings in
         * stringListTwo
         */
        Set<String> getFilteredStrings(Set<String> stringListOne, Set<String> stringListTwo) {
         
          Set<String> stringListOneFiltered = new HashSet<String>();
          for (String next : stringListOne) {
                for (String nextPrefix : stringListTwo) {
                    if (next.startsWith(nextPrefix)) {
                        stringListOneFiltered.add(next);
                    }
                }
            }
            return stringListOneFiltered;
        }
    

    Here's a test case for the above code:

    /**
         * Test method for {@link scratchpad.MyClass#getFilteredStrings(java.util.Set, java.util.Set)}.
         */
        @Test
        public final void testGetFilteredStrings() {
    
            MyClass uut = new MyClass();
            
            Set<String> stringListOne = new HashSet<String>();
            stringListOne.add("until");
            stringListOne.add("unite");
            stringListOne.add("under");
            stringListOne.add("prepare");
            stringListOne.add("pretend");
            stringListOne.add("prefix");
            stringListOne.add("prepend");
            stringListOne.add("post");
            stringListOne.add("positive");
            stringListOne.add("postgame");
            stringListOne.add("postpone");       
            
            Set<String> stringListTwo = new HashSet<String>();
            stringListTwo.add("post");
            stringListTwo.add("pre");
            stringListTwo.add("und");
            
            
            Set<String> result= uut.getFilteredStrings(stringListOne, stringListTwo);
            
            System.out.println(result);
            assertEquals(8, result.size());
        }
    

    Thanks for any help you can provide!  I get the hang of using the course of water, but this particular code was difficult.

    tmbc

    I found the following solution to my question:

    GetFilteredStrings (Set stringListOne, the value

    {Set stringListTwo)

    Predicate startsWith = p-> stringListTwo.stream () .anyMatch (prefix-> p.startsWith (prefix));

    Return stringListOne.stream () .filter (startsWith) .collect (Collectors.toSet ());

    }

  • Why Oracle ManagedDataAccess (4.121.1.0) throws a System.FormatException "first chance" exception to the debugger when you use OracleCommand.BindByName (on some machines, but not others)?

    Why Oracle ManagedDataAccess (4.121.1.0) throws a System.FormatException "first chance" exception to the debugger when you use OracleCommand.BindByName (on some machines, but not others)?

    This occurs when calling a ref cursor-returning packaged function stored with OracleCommand.BindByName set to true.

    When BindByName undefined, it works as expected.

    I've only been able to recreate this problem on a machine in my control. This issue has also reported to me by a customer.

    I tried to change the locale of the system of EN - UK EN-US, but I was not aware of any change in behavior.

    Similarly, I've tried explicitly overriding the default locale of the system with the OracleGlobalization parameters, and it also had no effect.

    Please see the example below.

    ---

    Environment (default):

    Windows 7 Professional 64-bit SP1

    Visual Studio 12.0.21005.1 REL / / CAN BE SIGNIFICANT

    .NET framework 4.5.51209

    Local system: EN - UK (but also does not, EN-US).

    Oracle.ManagedDataAccess 4.121.1.0

    "< supportedRuntime version ="v4.0"sku =". NETFramework,Version=v4.5.1"/ >

    Environment (base):

    Windows 7 Professional 64-bit SP1

    Updated Visual Studio 12.0.31101.00 //SEE above 4

    .NET framework 4.5.51209

    Local system: EN - UK

    Oracle.ManagedDataAccess 4.121.1.0

    "< supportedRuntime version ="v4.0"sku =". NETFramework,Version=v4.5.1"/ >

    Call stack:

    mscorlib.dll. Unknown System.Number.StringToNumber(string str, System.Globalization.NumberStyles options, ref System.Number.NumberBuffer number, System.Globalization.NumberFormatInfo info, bool parseDecimal)
    mscorlib.dll. Unknown System.Number.ParseInt32(string s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info)
    Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Types.OracleRefCursor.OracleRefCursor (connection Oracle.ManagedDataAccess.Client.OracleConnection, OracleInternal.ServiceObjects.OracleRefCursorImpl refCursorImpl, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long initialLongFS, long initialLobFS, long [] scnFromExecution) unknown
    Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleParameterImpl.ExtractRefCursorFromAccessor (Oracle.ManagedDataAccess.Client.OracleConnection conn, accessor OracleInternal.TTC.Accessors.Accessor, long fetchSize, Oracle.ManagedDataAccess.Client.PrmEnumType enumType, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution, int currentRow) unknown
    Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleParameterImpl.GetRefCursorFromBytes unknown (Oracle.ManagedDataAccess.Client.OracleConnection conn, accessor OracleInternal.TTC.Accessors.Accessor, long fetchSize, Oracle.ManagedDataAccess.Client.PrmEnumType enumType, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution)
    Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Client.OracleParameter.PostBind_RefCursor (connection Oracle.ManagedDataAccess.Client.OracleConnection, OracleInternal.TTC.Accessors.Accessor bindAccessor, long fetchSize, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution) unknown
    Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleCommandImpl.ExtractAccessorValuesIntoParam (Oracle.ManagedDataAccess.Client.OracleParameterCollection paramColl, Oracle.ManagedDataAccess.Client.OracleConnection connection, string commandText, long longFetchSize, long lobFetchSize, long [] scnFromExecution) unknown
    Oracle.ManagedDataAccess.dll! Unknown Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(bool requery, bool fillRequest, System.Data.CommandBehavior behavior)
    Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader (unknown)

    > ManagedSimpleRefCursor1.exe! NoddyConsole.Program.Command_ExecuteReader_BindByName_Fails (Line 63 c#)

    Example:

    ----

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using Oracle.ManagedDataAccess.Client;

    using Oracle.ManagedDataAccess.Types;

    using System.Data;

    namespace NoddyConsole

    {

    public class Program

    {

    public static int Main (string [] args)

    {

    Error int = 0;

    Errors += Command_ExecuteReader_BindByName_Fails();

    Errors += UseReturnValue_Command_ExecuteNonQuery_BindByName_Fails();

    return errors;

    }

    public static int Command_ExecuteReader_BindByName_Fails()

    {

    Error int = 0;

    Try

    {

    var conn = new OracleConnection ("UID = USER; Password = PASS; ("Data Source = / / your-host: 1521 / yours-sid");

    var conn = new OracleConnection ("user Id = UNIT620; Password = UNIT620; ("Data Source = / / ln1apidb01:1521 / fm");

    Conn. Open();

    IRRELEVANT

    OracleGlobalization og is conn. GetSessionInfo();

    og. DateFormat = "HH24:MI:SS MON-DD-YYYY";

    Conn. SetSessionInfo (og);

    var cmd is conn. CreateCommand();

    cmd.CommandType = CommandType.Text;

    BindByName. cmd = true;

    cmd.CommandText = "START: rc: = SHAUN.recreate_issue_1 (in_code = >: in_code); END; « ;

    var prm1 is cmd. CreateParameter();

    PRM1. ParameterName = "rc";

    PRM1. Direction = ParameterDirection.ReturnValue;

    PRM1. OracleDbType = OracleDbType.RefCursor;

    cmd. Parameters.Add (prm1);

    / * SHAUN.recreate_issue_1 * /.

    var prm2 is cmd. CreateParameter();

    PRM2. ParameterName = "in_code";

    PRM2. Direction = ParameterDirection.Input;

    PRM2. OracleDbType = OracleDbType.Varchar2;

    PRM2. Value = "A";

    cmd. Parameters.Add (prm2);

    /* */

    var reader is cmd. ExecuteReader(); FAILS to System.Number.StringToNumber (String str, NumberStyles options, NumberBuffer & number, NumberFormatInfo info, Boolean parseDecimal)

    /* *-/

    OracleRefCursor orc = null;

    cmd ExecuteNonQuery()); must fail here

    ORC = cmd. Parameters ["rc"]. Value as OracleRefCursor;

    If (orc is nothing)

    throws InvalidOperationException new ("Invalid return the ref cursor type");

    var = orc player. GetDataReader();

    /* */

    While (reader. Read

    {

    var values = new object [reader. FieldCount];

    drive. GetOracleValues (values);

    for (int i = 0; i < values.) Length; (++ I)

    {

    Console.WriteLine(values[i]);

    }

    }

    drive. Dispose();

    cmd. Dispose();

    Conn. Dispose();

    }

    catch (Exception ex)

    {

    Console.Error.WriteLine (ex) Message);

    Errors ++;

    }

    Finally

    {

    Return (true);

    }

    return errors;

    }

    public static int UseReturnValue_Command_ExecuteNonQuery_BindByName_Fails()

    {

    Error int = 0;

    Try

    {

    var conn = new OracleConnection ("UID = USER; Password = PASS; ("Data Source = / / your-host: 1521 / yours-sid");

    Conn. Open();

    IRRELEVANT

    OracleGlobalization og is conn. GetSessionInfo();

    og. DateFormat = "HH24:MI:SS MON-DD-YYYY";

    Conn. SetSessionInfo (og);

    var cmd is conn. CreateCommand();

    BindByName. cmd = true; // ####

    cmd.CommandText = "START: rc: = SHAUN.recreate_issue_1 (in_code = >: in_code); END; « ;

    cmd.CommandText = "START: rc: = SHAUN.recreate_issue_2; END; « ; No params, works

    var prm1 is cmd. CreateParameter();

    PRM1. ParameterName = "rc";

    PRM1. Direction = ParameterDirection.ReturnValue;

    PRM1. OracleDbType = OracleDbType.RefCursor;

    cmd. Parameters.Add (prm1);

    / * SHAUN.recreate_issue_1 * /.

    var prm2 is cmd. CreateParameter();

    PRM2. ParameterName = "in_code";

    PRM2. Direction = ParameterDirection.Input;

    PRM2. OracleDbType = OracleDbType.Varchar2;

    PRM2. Value = "A";

    cmd. Parameters.Add (prm2);

    /* */

    var reader is cmd. ExecuteReader();

    OracleRefCursor orc = null;

    HERE does NOT cmd. BindByName = true; System.FormatException first-chance exception in at System.Number.StringToNumber (String str, NumberStyles options, NumberBuffer & number, NumberFormatInfo info, Boolean parseDecimal)

    cmd ExecuteNonQuery());

    ORC = cmd. Parameters ["rc"]. Value as OracleRefCursor;

    If (orc is nothing)

    throws InvalidOperationException new ("Invalid return the ref cursor type");

    var = orc player. GetDataReader();

    While (reader. Read

    {

    var values = new object [reader. FieldCount];

    drive. GetOracleValues (values);

    for (int i = 0; i < values.) Length; (++ I)

    {

    Console.WriteLine(values[i]);

    }

    }

    drive. Dispose();

    ORC. Dispose();

    cmd. Dispose();

    Conn. Dispose();

    }

    catch (Exception ex)

    {

    Console.Error.WriteLine (ex) Message);

    Errors ++;

    }

    Finally

    {

    Return (true);

    }

    return errors;

    }

    }

    }

    ---

    create or replace package THAT SHAUN is

    type ref_cur_type is ref cursor;

    function recreate_issue_1)

    in_code varchar2: = null

    ) return ref_cur_type;

    end SHAUN;

    /

    create or replace package body what SHAUN

    -TTS000233

    function recreate_issue_1)

    in_code varchar2: = null

    ) return ref_cur_type is ref_cur ref_cur_type;

    Start

    Open the ref_cur for

    Select UO.object_name from user_objects UO;

    Return ref_cur;

    end recreate_issue_1;

    end SHAUN;

    /

    ---

    Thanks a lot to qualify again for me Alex.  I'll try upgrading to the latest version of the provider.

    The difference in behavior between the two hosts was found to be reduced to differences in configuration VS.

    Checking 'Just my code' prevents the first chance thrown in the debugger exception. As in fact, the exception is handled in the provider, it is enough for me.

Maybe you are looking for

  • When I copy and paste a web title, why does more extra code ("see more: article link")?

    I'm used to be able to copy a title and only get the title. Example: "Nuncio urges bishops to attend the faith to the youth." Now, this is what happens when I copy and paste: Nuncio urges bishops to witness to the faith to the youth - see more at: ht

  • Satellite Pro A120 - start without LAN monitoring

    Just unpacked the first pallet-load A120s and cannot work out how to configure startup options: it takes the machine to boot from LAN first, then HARD drive - without human intervention. It should also prevent starting from what that this is other th

  • File in its place? ~/Library/com. Apple.nsurlsessiond

    Hello OS X 10.11.3, all updates installed as of February 23, 2016 I have a folder named com.apple.nsurlsessiond directly in my ~ / library. I discovered removal of fragments of the app and it seems very incongruous, naming scheme would fit into ~/Lib

  • Why a process called "soagent" eats my CPU?

    Yesterday, I noticed that the fan on my MacBook Pro was continued uninterrupted, make a ton of noise, and the performance of my machine had slowed to a crawl. I open the activity monitor to find that a process called 'soagent' was about using 106% of

  • HP 15-r001nc: controller and USB network controller

    Hello. I reinstalled my OS to Windows 7 and I need the software for my laptop HP 15-r001nC: controller and USB network controller. Thank you