How to make a Plan to explain on PL - SQL?

Hey guys, it's Xev, I'm back with a whole new positive attitude . I am very happy now that I got my cluster (11.2) 2-node RAC 11 GR 2 installed and working properly

I'm doing a plan to explain some pl - sql, I wrote, but I'm having a hard time trying to figure out how to make it work.

The catplan.sql has been performed and I a plan_table ready and waiting for me.

Here's the full code as well as the two tables table that I use, just as I'm supposed to display.

This is the first table

and Yes, I only want a single folder in there...

CREATE TABLE FILLER

("DATA_PACKED" VARCHAR2 (75 BYTE)

)

Insert in FILLING (DATA_PACKED) values ('KICKKKKKKKKK');

commit;

Then at the top on the list is the table of the HAMMER, I will insert all the data once the pl/sql program runs...

This table is supposed to be empty...

CREATE TABLE HAMMER

('H1' VARCHAR2 (100 BYTE),

"H2" VARCHAR2 (100 BYTE)

)

and now, the CODE... Now, it is a very small version of my load of GR 11, 2 test scripts that I wrote, but I need to see execution plan behind this logic.

I can even make a plan to explain on this code, or do I have to use something else?

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

declare

Table type is table of the varchar2 (30) index directory.

Table Z_STUFF.

Start

Select * BULK COLLECT into Z_STUFF of filling;

because me in 1... 100

loop

for zoo in 1... Z_STUFF. Count

loop

Insert into HAMMER (H1, H2)

values (Z_STUFF (zoo), Z_STUFF (zoo));

end loop;

end loop;

end;

/

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

All comments are welcome, I just need to see what makes this logic behind the scenes...

Thank you

Xev.

A query plan refers to an SQL statement.  A PL/SQL block can have 0 or more SQL statements.  It is, therefore, unnecessary to speak to generate a query plan for a PL/SQL block.  Your PL/SQL block happens to contain two different SQL statements.  You might get two different query plans, one for each statement.  Given how trivial statements are, however, I'm not sure that query plans would give you a lot of information.

What is the problem you're trying to solve?  If you try to set the PL/SQL, you probably want to look into various profilers of PL/SQL.  For example, the DBMS_PROFILER package or the package DBMS_HPROF.

Justin

Tags: Database

Similar Questions

  • How to display the plan will contact a specific sql in pl/sql?

    Hello Experts,

    Maybe it's a very simple question, but I really wonder, how explain the plan to the following sql.

    DECLARE

    The p_value number;

    BEGIN

    I'm IN (SELECT * FROM emp WHERE empno = p_value)

    LOOP

    -do something

    END LOOP;

    END;

    Thank you

    Activate the trace session

    Run your PLSQL

    End of the session trace.

    Your trace file is now ready.

    Use utility TKPROF to see the trace.

    Now, you will see the SQL used in PLSQL program used execution plan.

    Read using Application tracing tools

  • How to make the sum of the time through SQL?

    Dear friends

    I have a sh_detail table and there are three fields hours1, hours2 hours3. all fields are of type varchar2.

    data are like

    hours1 hours2 total hours3

    02:45 00:18 01:25

    00:38 01:45 00:00

    02:15 02:00 00:15

    1. I want to add on three fields in the total column

    2 and want to make the sum of all areas as select sum (hours1) of sh_detail.

    Please help I will be grateful.

    Kind regards.

    As others have said, use the NUMBER to store times, or the type of data correct INTERVAL, even if the latter cannot be aggregated (using the SUM).

    In the meantime, this will give you the output desired in a few minutes (it is trivial to convert it back in format hh: mm if you wish):

    SQL> with sample_data (id, hours1, hours2, hours3) as (
      2    select 1, '02:45', '00:18', '01:25' from dual union all
      3    select 2, '00:38', '01:45', '00:00' from dual union all
      4    select 3, '02:15', '02:00', '00:15' from dual
      5  )
      6  select id
      7       , sum(h1) h1
      8       , sum(h2) h2
      9       , sum(h3) h3
     10       , sum(h1+h2+h3) as total
     11  from (
     12  select id
     13       , to_number(substr(hours1, 1, 2))*60 + to_number(substr(hours1, 4, 2)) as h1
     14       , to_number(substr(hours2, 1, 2))*60 + to_number(substr(hours2, 4, 2)) as h2
     15       , to_number(substr(hours3, 1, 2))*60 + to_number(substr(hours3, 4, 2)) as h3
     16  from sample_data
     17  )
     18  group by rollup(id) ;
    
            ID         H1         H2         H3      TOTAL
    ---------- ---------- ---------- ---------- ----------
             1        165         18         85        268
             2         38        105          0        143
             3        135        120         15        270
                      338        243        100        681
    
  • How keep the formatting of a plan to explain in the forum.

    Hi all

    I would like to know how to keep the formatting of a plan to explain in the new forum. I used to use {} code in the old forum, but it no longer works. I used '-' in the new forum, but apparently not worked either.

    An example would be greatly appreciated!

    Thank you very much.

    You can try to use the font "Courier New" for the explain plan command part. That would make it readable.

    HTH,

    Joy

  • I need to make a banner 300 inches wide, but it is defaulted to 224 inches.  How can you make your plan of work greater than the maximum allowed?

    I ned to do a banner 12' high x 25 ft wide.  The default width to 224 inches.  How can I extend this to my width?

    As SRiegel suggested above - I would half work to make things easy for you. So, make your plan of work 6' x 12.5 then output the file to 200%. See also the note above from messages on images.

  • I have the following plan to explain, but I don't know how interperent it

    Hello all;

    I have the explain plan following below obtained pl/sql developer, but I don't know how to interperent or use it for my performance problem
    PLAN_TABLE_OUTPUT          
               
    ----------------------------------------------------------------------------------------          
    | Id  | Operation                       |  Name                | Rows  | Bytes | Cost  |          
    ----------------------------------------------------------------------------------------          
    |   0 | SELECT STATEMENT                |                      |     1 |   108 |   932 |          
    |   1 |  SORT GROUP BY                  |                      |     1 |   108 |   932 |          
    |*  2 |   TABLE ACCESS BY INDEX ROWID   | OPERATION            |     1 |    34 |    12 |          
    |   3 |    NESTED LOOPS                 |                      |     1 |   108 |   929 |          
    |   4 |     NESTED LOOPS                |                      |     1 |    74 |   917 |          
    |*  5 |      HASH JOIN                  |                      |     1 |    60 |   916 |          
    |*  6 |       TABLE ACCESS FULL         | WORK_ORDER           |  1302 | 46872 |   787 |          
    |*  7 |       TABLE ACCESS FULL         | SERIALIZATION_TRACE  |   129K|  3044K|   123 |          
    |*  8 |      TABLE ACCESS BY INDEX ROWID| PART                 |     1 |    14 |     1 |          
    |*  9 |       INDEX UNIQUE SCAN         | SYS_C004302          |     1 |       |       |          
    |* 10 |     INDEX RANGE SCAN            | RCLX_OPERATION_3     |     1 |       |    11 |          
    ----------------------------------------------------------------------------------------          
               
    Predicate Information (identified by operation id):          
    ---------------------------------------------------          
               
       2 - filter("O"."RESOURCE_ID" LIKE 'TEST%')          
       5 - access("W"."BASE_ID"="PT"."WORKORDER_BASE_ID" AND           
                  "W"."LOT_ID"="PT"."WORKORDER_LOT_ID" AND "W"."SPLIT_ID"="PT"."WORKORDER_SPLIT_ID" AND 
                  "W"."SUB_ID"="PT"."WORKORDER_SUB_ID")          
       6 - filter("W"."TYPE"='W' AND "W"."PART_ID" IS NOT NULL AND "W"."PART_ID"<>'RMA' AND           
                  "W"."PART_ID"<>'REWORK' AND "W"."CLOSE_DATE">=TO_DATE('2010-01-01 00:00:00',           
                  'yyyy-mm-dd hh24:mi:ss') AND "W"."CLOSE_DATE"<=TO_DATE('2010-12-31 00:00:00',           
                  'yyyy-mm-dd hh24:mi:ss'))          
       7 - filter("PT"."SERIAL_NUMBER"<>'N/A')          
       8 - filter("P"."PLANNER_USER_ID"='CCA')          
       9 - access("W"."PART_ID"="P"."ID")          
           filter("P"."ID"<>'RMA' AND "P"."ID"<>'REWORK')          
      10 - access("W"."SUB_ID"="O"."WORKORDER_SUB_ID" AND           
                  "W"."BASE_ID"="O"."WORKORDER_BASE_ID" AND "W"."LOT_ID"="O"."WORKORDER_LOT_ID" AND 
                  "W"."SPLIT_ID"="O"."WORKORDER_SPLIT_ID")          
           filter("W"."BASE_ID"="O"."WORKORDER_BASE_ID" AND           
                  "W"."LOT_ID"="O"."WORKORDER_LOT_ID" AND "W"."SPLIT_ID"="O"."WORKORDER_SPLIT_ID")     
               
    Note: cpu costing is off          
              

    Here are a few slides that I use when I present to you how to read explain plans:
    http://www.morganslibrary.org/Pres/lad/cloug_1_xplan.PDF

    |*  6 |        TABLE ACCESS FULL         | WORK_ORDER           |  1302 | 46872 |   787 |
    |*  7 |       TABLE ACCESS FULL         | SERIALIZATION_TRACE  |   129K|  3044K|   123 |
    

    Essentially, your question is here. you read a lot of lines to return alone. Do you need them all? To get them you do full table scan on the two tables? An index would help?

    and yes I am voluntarily is not giving you the answers but rather to point you in the right direction to find it yourself.

    On the one hand, I don't know your version, your SQL, or what indexes exist.

  • How to make your own Board BNC connector for 37 pins PCI-6010?

    This is first time I am doing data acquisition and the BNC-2110 present can be connected to PCI-6010. How to make a Board for it?

    I'm not sure what you mean by "some"; The BNC-2120 exposes all channels HAVE and AO on connector 0 of a standard feature of E, M or X series.

    • Eight BNC connectors are for eight differential channels of I. For example, for the BNC connector labeled 'I 0', the Center connects to the 'I 0' pine and the outside connects to pin 'HAVE 8'. (The BNC-2120 probably would not be a good choice for someone who wanted to use the channels in unbalanced mode).

    • Other two is for the analog output; the centres are ' AO 0' and 'AO 1' and transmissions are related to "AO GND".

    • There is another connector BNC for PFI 0; all other PFI (with the exception of the 10, 11 and 15) are broken down as screw terminals.

    • Other BNC connectors connect what either directly (the unit is powered by the + 5V line but otherwise works autonomously, and the "user defined signals' are connected to terminals to adjacent screws).

    It seems like it wouldn't be difficult to have a cable that was going on a PCI-6010 the 37 pins on the connector 68 pins on the BNC-2120. I'm a little curious as to why we do not have one. Possible reasons off the top of my head which may explain why not:

    • cards PFI/description would be a mistake (for example, on a series of E/M/X ' CTR 0 SRC "PFI 8; on the 6010 is PFI 0.)

    • No digital lines (E/M/x series P0.0 P0.7 via are independent; on the P0.0 6010 P0.5 and P1.0 by P1.3 are shared with PFI lines)

    • Confusion about being able to connect to other devices that we sell with connector d - SUB 37 pin, but who do not use a compatible pinout (for example, the PCI-6239, PCI-6510 or the NI 9237). Here again, a PCI-6703 also uses a 68 connector pins, but has a completely incompatible pinout as well.

    But it seems that those who would be pretty easy to deal with, because it is useful to be able to connect to the BNC-2010. Maybe it's an idea for the Exchange of ideas information Acquisition?

    Anyway, if you want to have pushed BNC for everything on your Board of homebrew will need you:

    • 8 or 16 BNC connectors to HAVE, depending on whether you want single-ended or differential. For differential, the centres are GOT by AI 7 0, and transmissions are AI by AI 15 8. For asymmetric, the centres are HAVE 0 through 15 AI and transmissions should all connect to GND AI.

    • HAVE a sense (I think that you only need this if you use channels Nonreferenced Single - Ended (NRSE). See also: noise considerations for analog signals and field wiring.)

    • Two for AO (centers are AO 0 and 1 AO, outers times connect to AO GND).

    • Ten for PFI/digital lines. Outers will connect to GND D.

    Up to a maximum of 29. You want maybe less, depending on your application.

  • How to make a macro with a goal photos 50 mm f1.8 Prime

    How to make a photos of macro with a prime lens 50 mm f1.8 lens is labeled macro, but only makes farm ups.

    A "true" macro lens allows to approach quite close to your subject that the size of the image on your sensor is larger than what is in real life.

    For example: your sensor is "roughly" 14 x 21 mm.  A penny in the United States has a diameter of 19mm.  This means with a real purpose of macro scale '1:1 ', you could get close enough to the penny the edges of upper and lower of the penny does not fit in the frame (the will of sides... barely.)

    There are a number of ways of "close-up" photography.

    (1) buy a "real" macro lens  The EF-S 60mm f/2.8 Macro USM lens is fantastic and also good enough prices.  A 'real' macro lens will provide the highest quality of image.

    (2) buy "extension tubes".  These committed between the casing and the lens, but they are hollow (there is no element of glass in them but they have electronic contacts so that the lens and the body can still communicate.)  By moving the furthest lens to the focal plane, the range of the lens is considerably reduced.  This allows you to get much closer that otherwise would be possibe.

    (3) use diopters "close up".  Here's the screw on filters that you screw on the end of your lens.  They provide a larger/more close to your subject.  The disadvantage of these, it is that they can show distortion near the edges of the image.

    (4) use a ring of "Recoil".  It is a ring that allows you to mount your lens on the camera body... back.  The screws on the front of the lens (where you would normally be screw on filters), but a bayonet mount on the other side, so you can connect it to the camera.  Using the lens 'backwards', you can get much clsoer.  The downside is that you can't control the lens.  Development is manual and you cannot change the opening.

  • How to make background changes color?

    Hey, I was watching recently a youtube video and a guy had a background resembling 5 or 6 lines wavy horizontal form, and he changed the color! He looked pretty impressive, but when I saw him, I was not really interested in this context again and the irony is that he has even posted a LINK to how to get the background that there, in the youtube description! And now that I became interested to customize my laptop more, I searched through my history in google chrome and I can't! So now what I ask people is, how to make a background that changes color? If you guys don't understand properly, then try patient and better explain, saying what im is basically "imagine that you have just a few plains wavy lines in front of you, imagine that they are blue, then imagine they turn suddenly red, then green, etc." That's basically what I mean...

    I have an Acer Aspire 5315 Laptop comes with Windows Vista Home Basic Edition...

    Hello

    You need Windows Vista Ultimate Edition or this program from Stardock (free, limited, feature the full version for $ 19.95): http://download.cnet.com/DeskScapes/3000-2336_4-10657476.html?tag=mncol

    I hope this helps.

  • How to make a simple video with my computer ' s web cam?

    I recently (10 minutes ago) asked a simple question on how to make a video.  For five of the most wonderful years of my life, I have designed critical systems of path for launch Pads 39A & B, the vehicle Assembly building and the robot that went out the candle to the pad.  On paper, a critical path system explained how the engineer, design and build a structure.  In this case, it was activities separate from about 3400 and when, how and how long these activities were to each other.  At the time where the Commander.  I worked and which had been granted to these contracts, had developed the method of the path critical following the guidance system of the Polaris Missile, which was incredibly hard to get a handle.  At the time where manned Apollo lunar Mission has been in place, I was one of only ten people in the world, who knew the process.  We needed honest, some answers to our questions or it would take years to accomplish what Stephen Hawking characterized as "the unique accomplishment largest in human history" you gave me answers to my questions by these 'engineers' for Microsoft on the use of a webcam and had implemented them, would not be there was a second launch of Apollo because the first three astronauts would be dead.  How to make a simple video with my computer ' s web cam?     Al wood

    http://www.WikiHow.com/use-webcam-on-Windows-Movie-Maker

    Movie Maker: http://windows.microsoft.com/en-us/windows-live/movie-maker

    Not tested.  Instructions could be for the old version of Movie Maker, but they probably give you the basics.

    (It's a way of many - that the answer does not depend on your OS, but on the software you use to interface with your webcam.  Camtasia?  Skype?  etc and so on...)

    In addition, to find this information is quite simple.  Once I decided on what software to go with in my response to you (I chose Windows Movie Maker 12 because it's easy to get, free, Microsoft, similar to products that were previously found with Windows) I did a simple search on Google:

    use Windows Movie Maker 12 with webcam

    https://www.Google.com/#q=Use+Windows+Movie+Maker+12+with+webcam

    or more demonstratively:

    http://lmgtfy.com/?q=Use+Windows+Movie+Maker+12+with+webcam

    The first hit seems to be a video market even helps you to download and install the Windows Movie Maker 12 application...

  • How to make a UI look like this image?

    Hello world

    I am a beginner Develop Blackberry, I am from VietNam country.

    I want to design an Application interface user lookl ike this image

    How to do this with Blackberry plugin for Eclipse?

    Please help me? Thanks a lot

    I'm waiting for the answer...

    Welcome to the forums.

    It's a difficult question to answer, because you are a junior developer.  So, there are many things that you must learn to understand the answers you get.  But could someone give you the code to do it and it might work, but if it breaks, then you know how to fix?

    So instead I'll give an overview of the solution and allow you to study and learn so much more as you go.

    First thing, it is to be abele to write a program that displays a screen.  I guess you found samples and therefore know how to do that.

    Then you need to understand the 'dimensions' and the capacity of a screen.  I think this article helps with this:

    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

    Then you must know how to create 3 columns on your screen.  I think that this article will help you with this:

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-custom-layout-manager-for-a-screen/...

    Then you must know how to create a field that uses the space allocated to it al:

    http://supportforums.BlackBerry.com/T5/Java-development/create-custom-fields/Ta-p/444962

    Finally, you need to know how to make this a button field.  To do this, you must override navigationClick and touchEvent.  Enter in which is probably a little too much right now.

    So many of read you.

    However I really recommend to start by working through the provided tutorials - tutorial type in the search box to find these.  With the help of tutorials, you will get a better understanding of how the BlackBerry "hangs together."

    And finally, I recommend you get a book, such as Bill Foust.

    Good luck and have fun!

  • BlackBerry smartphone how to make calls from phone with my PIN code and fees

    I got my BB also because I was also asked for my PIN by friends from across the Atlantic. How to make the best use of my blackberry phone to make calls. I know that I need a date of purchase, but can the wifi works instead.

    You can use the WiFi for a lot of things on your phone, but unless you have a BlackBerry data plan, you will not be able to access all the features of BlackBerry like BlackBerry Messenger, Facebook, Twitter, etc... even in WiFi.

    If someone asks for your PIN, it is so that they can reach you through surveys BBM (BlackBerry Messenger), which uses your PIN to log in instead of the e-mail address, your telephone number.

  • How to make desktop icons smaller please.

    How to make desktop icons smaller please?

    Click on your desktop, hold (control) and scroll with the mouse wheel.

    This explains in detail - http://www.addictivetips.com/windows-tips/how-to-resize-desktop-icon-in-windows-vista/ and offers alternatives as well.

  • How to make an object of deep zoom images in 3d

    well, looks at this 17 s video (and sorry for the low-res vid x()

    theres a film than zoom in / or drone like this video rec

    I can understand how to make the text 3d such as 3d tracking

    But how do you do (red and yellow) line like that?

    Thus, the line as draw in 3d space and have a depth

    Thank you

    I can understand how to make the text 3d such as 3d tracking

    But how do you do (red & yellow) line like that?

    Thus, the line as draw in 3d space and have a depth

    looking at your specific reference - these seem to be flat lines in 3d space. one way to do, is after you 3d on caterpillars and set your master plan, you can have a change of shape layer the ground plan null parent, add a path and draw in space 3d can open another view to the view of face and personalized your way. in a configuration up like this:

  • [Adobe Muse] How to make a horizontal menu with drop down horizontal?

    Hi all

    I would like to make a horizontal menu, but have drop them the low go horizontally rather than the default and the vertical level, like the model I made in photoshop. Can someone help me with this? Thank you!

    Screen Shot 2015-02-04 at 15.44.19.png

    My recommendation is to watch the following video of Adobe's Terry White, explaining how to make a custom horizontal menu (use the techniques and adapt):

    How to design a Custom Mega Menu in Adobe Muse CC - YouTube

    If you have any questions after watching, will try my best to answer, but feel that his explanation will be much better than any I can give here in writing.

Maybe you are looking for