How many cursor level for nested loop?

Cursor for loop nested up to level (depth)?
CURSOR cur_user_tab_cols
IS SELECT column_name
FROM user_tab_cols
WHERE column_name = 'DQ_SUMMARY';

The cursor should not

CURSOR cur_user_tab_cols
IS SELECT column_name
Of user_tab_cols
WHERE table_name = 'DQ_SUMMARY ';

Published by: Kiran on February 2, 2012 04:13

Tags: Database

Similar Questions

  • Where can I see how many days left for my free trial?

    Where can I see how many days left for my free trial?

    Hello

    You can open the Adobe Creative cloud application and go to the "' Apps'" tab at the top and that shows the days left in addition to each CC asked with days left for the trial expire. Also whenever you restart your computer and run any application CC it also shows the page pop up with days left for the trial expire.

    Thank you.

  • How many days does for delivery a sony vaio leptop in miami?

    Hi, my name is Jessica and I am of the Brazil. My aunt is going to the USA for 5 days and I'm going to buy a sony vaio leptop online and I'll send for her to miami, I want to know how many days it takes to deliver? Thank you for our help and sorry if I've made mistakes.

    Hello Pierre,.

    Thank you for your interest in Sony VAIO products. Depends on the delivery of computer model # chosen and availability. If you try to buy a model Configure - to - Order (CTO), you can check the shipping date estimated on the right corner of the screen.

    For more information, contact the Sony store team:

    http://eSupport.Sony.com/us/Perl/support-info.pl?info_id=927#place_order_1-1

    You can send an email to:

    [email protected]

    If my post answered your question, please mark it as an "accepted Solution".

  • How many license needed for our projects

    Hello

    We have help .chm (plane) WebHelp Pro. I wonder how many licenses I would need / what would be the best practice for our aid projects. I can't find a clear answer in the documentation for it.

    We have 3 main products PMS, POS, and CRM.
    Each product is multi lingual.

    Therefore, we have a project for each product and language combination.
    -Help the PMS English
    -Dutch PMS help
    -PMS German help
    -Ditto for the POS, CRM product.

    As each project is for a different product and language, we should not merge of these projects. If I understand the installation documentation, then I have an engine with different projects that are not merged, or I can have a different license for each of them.

    -What is the best practice? One or more licenses?
    -What are the pros and con's of each?

    Furthermore, we use RoboHelp X 5, the box has an upgrade to 'Office pro for .net' sticker and the cd has RoboEngine for .net (o listed version number).

    Hi, Colum and John-Pierre
    Akshay post on the Tech Comm blog was a very pleasant surprise for me. During the beta-test and written my article for the Developer Network site.
    http://www.Adobe.com/devnet/RoboHelp/articles/rhserver.html I missed this and he did not understand.

    This is terrible news that HR Server 6 no longer has the "License Manager" in Configuration Manager.

    This means that all the people who wanted to have projects with separate reports can now do without having to pay another $1,000 + for another license (as they did at the time of eHelp/Macromedia!) So now you can just put in place of the IIS Web sites and point your Configuration manager on a new Web site, and it configures the new server site. This will help the author create reports only to that site without having to pay extra.

    It is a performance of "sleeper" gigantic that has gone right in front of me. Akshay also addresses the issue of John-Pierre on Ports.
    Thank you
    John

  • Cursor implicit FOR THE LOOP and WHERE CURRENT OF

    Is it possible to add some updates and WHERE CURRENT OF for an implicit cusror of LOOPS?  There seems to be no way to reference the cursor as you can with an explicit cursor.

    BEGIN

    FOR point IN)

    SELECT last_name, job_id

    Employees

    WHERE job_id LIKE '% % CLERK '.

    AND manager_id > 120

    ORDER BY name

    )

    LOOP

    ...

    ...

    ...

    END LOOP;

    END;

    /

    Thank you

    It must be an explicit cursor.

  • How many layers levels can I have?

    I'm working on an image and I want to make changes to only certain parts. For example, I already have an adjustment of levels on a levels layer. Now, I want to make an adjustment of levels on another part after using the quick selection tool and I clicked on new adjustment layer and choose levels. I clicked on the layer > reorganize (I use a Mac) bring layer forward, I'm working on it. I noticed that the big picture, I'm working on that changed according to the order of the levels layer or on any other layer.  But that's okay, because when I send this layer 2 levels after working on it, my image looks the way I want it. I'm doing this right?

    Can I have several levels (or other) of the layers I want? I have a choice either choose create new levels adjustment layer or duplicate the background layer and then will improve > light adjust and levels here? Also, if I want to use the Spot Healing Brush or Clone Stamp tool, can I create a layer for this by duplicating the background layer, or just to make these changes on the image? I want to use layers because the changes are reversible, and if I don't like a change later, I can get rid of him. Last point, once I tried to use the clone tool, but the changes did not. I think I was working in a levels layer. Should I try to use the Clone Stamp tool on a layer of levels or create another layer, if possible, for cloning?

    fucanon wrote:

    But that's okay, because when I send this layer 2 levels after working on it, my image looks the way I want it. I'm doing this right?

    You make more work for yourself as necessary.  Always perform your choice of area first, then when you create a levels adjustment layer, the layer will be hidden automatically to your selection and you don't have to worry about the order of the layers:

    I do not know the limit of layers, you can have, but it's a lot.  If you encounter the limit, you're doing something not particularly good.

    You are absolutely right on using layers because of its reversibility and power refine the effect using them, so it is usually better to not use to strengthen... Adjust lighting... Levels on the image unless it will be used for a quickie.

    It is usually a good idea to start your editing by making a copy of the background layer and do the cloning or spot on this layer copy of healing.  Apply the same reasons: you can remove the layer of the copy if you get into trouble and still have the original background layer in a first time again.

    The Clone tool works on a layer of the image.  Make sure that the part of the image on the layer is active - it will have a box around it, if it is.

    Ken

  • Not the same State (<>) of nested loops

    Hi gurus and Experts.

    I need advice/suggestion on the query plan below. This plan is go for Nested Loops, am not able to force to go to the hash join or Merge Join with tips.
    Can someone help me please what is happening, and it is possible to escape from nested loops.
    I don't want to take the help of index for this scenario.

    D/B: Oracle 11 g 2,
    create table parent as
    with main as (select --+materialize 
    round(dbms_random.value(low=>1,high=>100)) SAMPLE_ID,dbms_random.string(opt=>'U',len=>10) SAMPLE_TEXT,rownum id from dual
    connect by level<=100000)
    select sample_id,rpad(sample_text,10,'*') padding,sample_text,id from main order by id
    create table child as
    with main as (select --+materialize 
    round(dbms_random.value(low=>1,high=>100)) SAMPLE_ID,dbms_random.string(opt=>'U',len=>10) SAMPLE_TEXT,rownum id from dual
    connect by level<=10000)
    select sample_id,rpad(sample_text,10,'*') padding,sample_text,id from main order by id
    select --+use_hash(p c)
    p.id from parent p,child c where p.id<>c.id
    Plan
    SELECT STATEMENT  ALL_ROWSCost: 973,076  Bytes: 8,999,910,000  Cardinality: 999,990,000            
         3 NESTED LOOPS  Cost: 973,076  Bytes: 8,999,910,000  Cardinality: 999,990,000       
              1 TABLE ACCESS FULL TABLE APP.CHILD Cost: 12  Bytes: 40,000  Cardinality: 10,000  
              2 TABLE ACCESS FULL TABLE APP.PARENT Cost: 97  Bytes: 499,995  Cardinality: 99,999  

    902629 wrote:

    I need advice/suggestion on the query plan below. This plan is go for Nested Loops, am not able to force to go to the hash join or Merge Join with tips.

    You will not be able to use a hash join

    http://docs.Oracle.com/CD/E11882_01/server.112/e16638/optimops.htm#i36043

    >
    The optimizer uses hash join to join two tables if they are added by using an equijoin and if one of the following conditions are met:
    >

    You may be able to force a sort merge join, it does not mention if different will work, I don't see how it would be

    http://docs.Oracle.com/CD/E11882_01/server.112/e16638/optimops.htm#i49183

    >
    Sort merge joins are useful when the join condition between two tables is a condition of inequality such as <,> <=,>, or > =. Fusion type joints are more successful than joins loops nested for large sets of data. You cannot use hash joins unless there is a condition of equality.
    >

    I can't imagine this treatment an antijoin more efficiently than nested If loops.

  • How to find how many times, how many numbers in a range of numbers (number of lines and columns) has been repeated (numbers 3.6.2)

    Hello

    I have a range of numbers from B2 - B11 until the G2 - G11. For example:

    31

    7

    28

    10

    4

    17

    20

    13

    44

    2

    1

    39

    32

    45

    39

    4

    10

    25

    26

    38

    27

    43

    12

    3

    42

    35

    37

    1

    34

    21

    13

    39

    11

    14

    5

    37

    21

    33

    34

    4

    13

    10

    31

    14

    1

    24

    35

    3

    20

    2

    24

    27

    22

    30

    10

    34

    36

    32

    3

    27

    I would like to know who among these numbers have occurred and how many times. For example (just to have as an example): number 10 repetitions 5 times, number 13 repeated 3 times, 24 repetitions 9 times.

    Repeats = duplicates.

    I want to know all the repetitive number and how many times they repeat.

    Is there some kind of formula I can use to get there. It would be good to have the sorted result. For example:

    32 repeats 10 times

    24 repeat 9 times

    6 reps 8 times

    5 repeat 7 times

    22. repeat 6 times

    10 repeats 5 times and so on.

    Hello

    Problem of three steps:

    1. Determine the distinct values
    2. Count the number of times each appears in the table
    3. Sort by value or frequency (or both).

    The first step is easily handled by copy separate Automator Service, a Service of Automator, written by SGIII. A link to the file in post June 21 of the SG in this thread: Re: Analyzing column (maybe not the correct wording)

    After downloading and installing the service, select the cells containing the numbers, call the service, and then select the first regular (ie. non-header) cell to a new table and the dough.

    (The following assumes the new table has a header row, no column header, and you have selected - click - cell A2 before pasting.)

    You will get a list of distinct numbers in a single column (A2 - A34, of your sample and support of note).

    To count the numbers:

    In this example, the existing table is named 'Table 1'

    Enter the following formula in B2 the new table, and then fill up to the last line of the column B:

    = COUNTIF (Table 1::B:G, A)

    Results should be as shown:

    Sort the results on column (value) or B (frequency)

    Two types (A, then B) will be put in order of frequency, with values appear the same number of times sorted by value within this group.

    Kind regards

    Barry

  • How many updates required to turn light Hall v. 5.2 up to v. 5.7.1? I downloaded 118 so far!

    How many updates required for v. 5.2 up to v. 5.7.1 Lightroom? I downloaded 118 so far!

    Thank you, Bill

    Uninstall your current lr5 and install the latest version of the lr5 (5.7.1) directly:

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

    window using the Lightroom 3 link to see these "important Instructions".

  • 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 / D@SEL$13
      23 - SEL$A8B7A3F4 / OH@SEL$1
      24 - SEL$A8B7A3F4 / O@SEL$13
      25 - SEL$A8B7A3F4 / O@SEL$13
      26 - SEL$13512960 / DF@SEL$13
      27 - SEL$13512960
      28 - SEL$13512960 / DF1@SEL$14
      29 - SEL$13512960 / DF1@SEL$14
      30 - SEL$A8B7A3F4 / H7@SEL$2
      31 - SEL$A8B7A3F4 / H7@SEL$2
      32 - SEL$A8B7A3F4 / DS@SEL$9
      33 - SEL$A8B7A3F4 / RST@SEL$11
      34 - SEL$A8B7A3F4 / ITT@SEL$3
      35 - SEL$A8B7A3F4 / ST@SEL$5
      36 - SEL$A8B7A3F4 / PT@SEL$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

  • 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 ());

    }

  • How to find the child level for each table in a relational model?

    Earthlings,

    I need your help, and I know that, "Yes, we can change." Change this thread to a question answered.

    So: How to find the child level for each table in a relational model?

    I have a database of relacional (9.2), all right?
    .
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"
    Tips:
    -Each circle represents a table;
    -Red no tables have foreign key
    -the picture on the front line of tree, for example, a level 3, but when 3 becomes N? How is N? That is the question.

    I started to think about the following:

    First of all, I need to know how to take the kids:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
     using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
     using (owner)
     where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;
    Thought...
    We will share!

    Thanks in advance,
    Philips

    Published by: BluShadow on April 1st, 2011 15:08
    formatting of code and hierarchy for readbility

    Have you looked to see if there is a cycle in the graph of dependence? Is there a table that has a foreign key to B and B has a back of A foreign key?

    SQL> create table my_emp (
      2    emp_id number primary key,
      3    emp_name varchar2(10),
      4    manager_id number
      5  );
    
    Table created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create table my_mgr (
      2    manager_id number primary key,
      3    employee_id number references my_emp( emp_id ),
      4    purchasing_authority number
      5* )
    SQL> /
    
    Table created.
    
    SQL> alter table my_emp
      2    add constraint fk_emp_mgr foreign key( manager_id )
      3         references my_mgr( manager_id );
    
    Table altered.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by prior child_table_name = parent_table_name
    SQL> /
    ERROR:
    ORA-01436: CONNECT BY loop in user data
    

    If you have a cycle, you have some problems.

    (1) it is a NOCYCLE keyword does not cause the error, but that probably requires an Oracle version which is not so far off support. I don't think it was available at the time 9.2 but I don't have anything old enough to test on

    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by nocycle prior child_table_name = parent_table_name
    SQL> /
    
           LVL CHILD_TABLE_NAME               PATH
    ---------- ------------------------------ --------------------
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
    

    (2) If you try to write on a table and all of its constraints in a file and do it in a valid order, the entire solution is probably wrong. It is impossible, for example, to generate the DDL for MY_EMP and MY_DEPT such as all instructions for a table come first, and all the instructions for the other are generated second. So even if NOCYCLE to avoid the error, you would end up with an invalid DDL script. If that's the problem, I would rethink the approach.

    -Generate the DDL for all tables without constraint
    -Can generate the DDL for all primary key constraints
    -Can generate the DDL for all unique key constraints
    -Can generate the DDL for all foreign key constraints

    This is not solidarity all the DOF for a given in the file object. But the SQL will be radically simpler writing - there will be no need to even look at the dependency graph.

    Justin

  • 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

  • How many gigabytes of data storage has the new Apple Watch series 2 and how many GB are free for music?

    How many gigabytes of data storage has the new Apple Watch series 2 and how many GB are free for music?

    Hello

    Apple has not yet announced the capacity of storage or the music of Apple Watch series 2 storage limit.

  • How many tracks can be recorded simultaneously in garageband version 10 for mac

    How many tracks can be recorded simultaneously in garageband version 10 for mac?

    You can only record 8 tracks simultaneously in garageband version 10.

Maybe you are looking for