approach two similar but very different plan?

I have two similar sql one I 100 ID sample counting from the max (id) of a table. and then I'll copy and paste that in (...) clause

And the other is I would use an inline clause. They have very different plan and a single traumatic passage slower. You guys can help explain why?

Quick version:

SELECT DATA_FILE_EVENT. EVENT_DETAIL,

DATA_FILE_EVENT. TOTAL_ITEMS,

DATA_FILE_EVENT_LIST. DATA_FILE_LOG_ID,

DATA_FILE_EVENT_LIST. ERROR_LIST,

DATA_FILE_EVENT_LIST. WARNING_LIST,

DATA_FILE_EVENT_LIST. LOADING_DISPOSITION,

EVENT. EVENT_CODE,

EVENT. DESCRIPTION

OF (YMS. DATA_FILE_EVENT DATA_FILE_EVENT

JOIN IN-HOUSE

YMS. EVENT EVENT

ON (DATA_FILE_EVENT. EVENT_CODE = EVENT. EVENT_CODE))

RIGHT OUTER JOIN

YMS. DATA_FILE_EVENT_LIST DATA_FILE_EVENT_LIST

ON (DATA_FILE_EVENT_LIST. DATA_FILE_LOG_ID =

DATA_FILE_EVENT. DATA_FILE_LOG_ID)

en)

45960479,

45960480,

45960481,

45960482,

45960483,

45960484,

45960485,

45960486,

45960487,

45960488

)



slow version:


SELECT DATA_FILE_EVENT. EVENT_DETAIL,

DATA_FILE_EVENT. TOTAL_ITEMS,

DATA_FILE_EVENT_LIST. DATA_FILE_LOG_ID,

DATA_FILE_EVENT_LIST. ERROR_LIST,

DATA_FILE_EVENT_LIST. WARNING_LIST,

DATA_FILE_EVENT_LIST. LOADING_DISPOSITION,

EVENT. EVENT_CODE,

EVENT. DESCRIPTION

OF (YMS. DATA_FILE_EVENT DATA_FILE_EVENT

JOIN IN-HOUSE

YMS. EVENT EVENT

ON (DATA_FILE_EVENT. EVENT_CODE = EVENT. EVENT_CODE))

RIGHT OUTER JOIN

YMS. DATA_FILE_EVENT_LIST DATA_FILE_EVENT_LIST

ON (DATA_FILE_EVENT_LIST. DATA_FILE_LOG_ID =

DATA_FILE_EVENT. DATA_FILE_LOG_ID)

where data_file_event.data_file_log_id-= 44793729

en)

Select

rownum + x1.upx sample_log_id

Of

(

Select upx-100 max (data_file_log_id) of data_file_log

) x 1

connect by level < = 10

)



I joined the plan explan in jpeg I am using Toad.

Thank you.fast_sample_event_plan.JPGslow_sample_event_plan.JPG

Performance differ, due to the change of plan...!

In a bad series,

FTS (step 11 - hash for two tables join) happens with Nestep loops (step 12).

I have e for each record of the return of major steps...

estimation of cardinaliy steps is only 1...

Where oracle observe as main steps returns records only 1, hash join operation will be done only once.

but this is not the case...

observe the same behavior for under sql also...

select rownum from dual connect by rownum < 1000;
select level from dual connect by level < 1000;

-----------------------------------------------------------------------------
| Id  | Operation                    | Name | Rows  | Cost (%CPU)| Time    |
-----------------------------------------------------------------------------
|  0 | SELECT STATEMENT            |      |      |    2 (100)|          |
|  1 |  CONNECT BY WITHOUT FILTERING|      |      |            |          |
|  2 |  FAST DUAL                  |      |    1 |    2  (0)| 00:00:01 |
-----------------------------------------------------------------------------

Although the back lines are 999 but cardinality is 1.

No provision of cardinality for only connect by clause...!

Similar SQL as yours...

select  rownum + max_c sample_log_id
                            From
                            (Select Max(Empno) Max_C From Emp)
                            connect by level <=10;
----------------------------------------------------------------------------------------
| Id  | Operation                    | Name  | Rows  | Bytes | Cost (%CPU)| Time    |
----------------------------------------------------------------------------------------
|  0 | SELECT STATEMENT              |        |      |      |    1 (100)|          |
|  1 |  COUNT                        |        |      |      |            |          |
|  2 |  CONNECT BY WITHOUT FILTERING|        |      |      |            |          |
|  3 |    VIEW                      |        |    1 |    13 |    1  (0)| 00:00:01 |
|  4 |    SORT AGGREGATE            |        |    1 |    4 |            |          |
|  5 |      INDEX FULL SCAN (MIN/MAX)| PK_EMP |    1 |    4 |    1  (0)| 00:00:01 |
----------------------------------------------------------------------------------------

Cardinality estimated is one.

Tags: Database

Similar Questions

  • How can I access the tutorials that come with Photoshop on a Mac?  I have the "Editor", if that's what it's called, in front of me.  I consulted the tutorials on a Windows computer, but the arrangement on a Mac is very different?

    How can I access the tutorials that come with Photoshop on a Mac?  I have the "Editor", if that's what it's called, in front of me.  I consulted the tutorials on a Windows computer, but the arrangement on a Mac is very different?

    Hi jrjw48109603,

    Concerning

    Rohit

  • Against the same table, similar index result in very different performances

    Hi guys,.

    31%
    create table TRACING_0727
    (
      ID             CHAR(36) not null,
      CALL_ID        CHAR(36) not null,
      CALLER_ID      VARCHAR2(100) not null,
      TIME_STAMP     VARCHAR2(50) not null,
      PACKAGE_NAME   VARCHAR2(30),
      PROCEDURE_NAME VARCHAR2(30),
      BEGIN_DATE     TIMESTAMP(6) not null,
      END_DATE       TIMESTAMP(6),
      EXCEPTION_TXT  VARCHAR2(500)
    )
    ;
    -- Create/Recreate primary, unique and foreign key constraints 
    alter table TRACING_0727
      add constraint TRACING_0727_PK primary key (ID);
    -- Create/Recreate indexes 
    create index TRACING_0727_IX on TRACING_0727 (CALL_ID); 
    After reboot, I have run below the statement that costs me about 1 second. And this statement uses TRACING_0727_PK:
    select count(*) from enterprise_tracing_0727;
    After another reboot, I run below the statement that is forced to use TRACING_0727_IX, and it takes about 30 seconds:
    select /*+index(tracing_0727 TRACING_0727_IX)*/ count(*) from tracing_0727;
    The table about 400000 lines and the oracle server is on my laptop, the server is not busy. The field ID and CALL_ID are both a string GUID.
    In my opinion, these 2 indices are similar, and their size must be similar too, since count (*) select will make the analysis of the overall index, the performance of these 2 sql should be similar, but why they are so different in my test? I test several times and each time I get the same result.

    Thanks in advance.

    Hi Serge

    Yes, the reason is that the first query is using an Index fast Full Scan and by reading diluvium (fast), while the second uses a Full Index Scan and by reading one piece (slow).

    You must change the flag to an INDEX_FFS hint to get the second clue to also use a FFS.

    See you soon

    Richard Foote
    http://richardfoote.WordPress.com/

  • Satellite L670-1LM - Touchpad behaves in a very different way

    Heey people!

    It's maybe a stupid question, but I don't know the answer, so I'm asking anyway.

    I recently bought a new Sattelite L670-1LM and everything works fine. Only the touchpad behaves in a very different way compared to what I'm used to.

    The two buttons, left and right, the same behavior. If I click on a random place on the screen, a quick menu appears, as if I clicked the right button of the mouse. When I noticed it, I first thought that the two buttons have been "buttons on the right."

    Then I noticed that when I actually click something, it opens as if I hit the left button of the mouse! So I seem to be able to do something with the two buttons because they have properties of both left and right mouse buttons!

    When I plug in an external mouse, quick menu opens when I click on the right button and I can open applications with the left button as I'm used to...

    Is this the usual way of a touchpad on a Toshiba laptop works or there at - it something wrong? To me, it seems as if it may be a hardware error, because it seems quite unlikely that messes things anerror, but still he messes up in a way that you can still do everything you could do with 2 different buttons. However, I have never seen this before, so I really wanted to ask the question.

    Also, anyone know how I can change this setting to a mouse "classic"? I can't fix by using the menu on the properties of the touchpad.

    Thanks in advance! Maybe it's a really stupid question, but I'm not an expert in this area.

    Thank you!
    Bottom

    OK... so now, I noticed that if I change the settings, something changes.

    If I put two buttons as buttons on the left, the two work as buttons on the left,
    If I put two buttons as buttons on the right, both work as buttons on the right, until here nothing unusual.

    However, if I put a button as the button on the right and the other as a button on the left, they both work as these buttons 'combination' I explained in my previous post... Any of them, I put as a button on the right, they always do the same thing.

  • Flattening, save money, levels: a very different output than what I see on the screen

    Photoshop wizards! I'm stumped on this problem and it's driving me bananas! It's a simple photoshop file, thus creating a background star field using noise and great basic tools. However, when I try somehow to save or flatten the image, the results look different way from what I see on the screen! This problem just started today and I don't know why, and nothing I've tried has fixed it. I am literally unable to create anything because whenever I try to save, I get a very different picture.

    photoshop.jpg
    In this screenshot, I use the save for web window to show what is happening, but it's the same, if I Flatten all layers, merged copy or try to save it as that - of course the results are not what my original document shows. It's like levels and layers are completely ignored. The same thing also happens when I try to apply levels to any similar image, it seems to go in the preview, and then totally different after the application.

    There is no transparency, layer styles or something tricky going. The document has the color management and RGB 8-bit/channel, test colors is disabled. I restarted my computer restarted the document from scratch twice, reset my preferences, off hardware acceleration, updated for the last CC 2015.5 and have been Googling for the last hour... no luck.

    I forget something really stupid, or I don't know what. I remember running on this problem before with my old laptop, but I do not remember what was the solution if I ever found a. If anyone wants to check out the document, it will be temporarily here:

    Stats: Mac OS X MacBook Pro 10.11.4, (2015)
    Appreciate any help!

    Glimpses of adjustment are calculated on the basis of the ratio of the screen zoom. This is done for performance reasons.

    In other words: If you view at 50%, the preview adjustment is calculated from this version sous-échantillonnées. Now look at this reduction of scale means causing the pixel details - it becomes blurry and fuzzy. So now you get a series of intermediate values that do not exist in the original, and you see adjusted values that do not exist. I can give you a false idea. But when you post adjustment (Flattening), the complete original data are used.

    Always keep in mind that the beach tonal adjustments have no effect on each of the pixels that are pure black or pure white. They only work on the medium gray.

    This consideration applies to all images with high acutance (sharp pixel-level transitions). It is not normally a problem for a normal picture with smooth transitions.

  • to connect guests of b/w two current running on different hosts

    Hello friends

    in fact, I am very new to vmware... I installed the RHEL4 as a guest operating system. problem is that I want to communicate between two same hosts prompt if running on different machines (which are on the same subnet.. .one has ip 192.168.4.238 and another 192.168.4.237). but the ip address assigned by dhcp to the two guest OS are different subnet... .for ex was 192.168.137.128 and another 192.168.17.2...

    I can't do a ping to a guest at the same host and another host also...

    Help me...

    Thank you

    Hello and welcome to the forums.

    For Server, Workstation or Player he just use bridged networking and obtain an IP address from the DHCP server on the subnet or assign addresses manually.

    Good luck!

  • When establishing a new phone i SE with 64 is very different from the i phone 5 or 6?

    When establishing a new phone i SE it is very different from an i phone 5 or 6?  I had the extra memory with mine but have android phones. How can I ask siri a question?

    gimpnurse wrote:

    When establishing a new phone i SE it is very different from an i phone 5 or 6?  I had the extra memory with mine but have android phones. How can I ask siri a question?

    http://www.siriuserguide.com/how-to-use-Siri/

    You can google "comparing models of iPhone" to find your answer.

  • bookmarks.HTML makes very differently in FireFox 4

    For years, I have been using and loving Firefox (including 4.0).

    For years, I have also exported my bookmarks on Firefox and use the file bookmarks.html as my home page.

    Now, Firefox 4 restores the file bookmarks.html very differently from previous versions of Firefox and other browsers also differently (for example, IE).

    The indentations disappeared when viewing bookmarks.html in Firefox 4. Unfortunately, it is not really easy to show you this within this forum text box, but I'll try.

    Firefox 4 shows something like this:

    Bookmarks menu

    General interest

    Markham Weather Forecast - Environment Canada
    The Weather Network - Markham
    The Weather Channel - Markham
    AccuWeather.com - Canadian Forecast Center
    

    ... etc.

    Firefox 3.6, IE and other browsers show something like this (note the indentations that greatly improve readability):

    Bookmarks menu

         General Interest
    
               Markham Weather Forecast - Environment Canada
               The Weather Network - Markham
               The Weather Channel - Markham
               AccuWeather.com - Canadian Forecast Center
    
               ... etc
    

    Is this a bug in Firefox 4? I would really like to see bookmarks.html rendered with the indentations.

    Am I missing something?
    Thank you.

    You can add this CSS code in the HTML file below the line with the meta tag, or use the copy method shown above by stormseye

    <style type="text/css" >
    dl > dt > dl {
     margin-left: 40px;
    }
    </style>
    
  • I have a HP laptop with Windows 7 (OS) with 64 bit, but very slow. Can you suggest a way to start my fast pc.

    I have a HP laptop with Windows 7 (OS) with 64 bit, but very slow. Can you suggest a way to start my fast pc? Most of the time it doesn't quite work.

    Hello

    There are a number of possible reasons, your computer may run slowly - virus infection or malware, missing to defragment the hard drive, too many programs loading at startup - and all with different causes / solutions. So here goes:

    Virus/Malware - Download, install and run these scanners (only Avast so you do not have your own antivirus installed):

    Malwarebytes': http://download.cnet.com/Malwarebytes-Anti-Malware/3000-8022_4-10804572.html .

    SuperAntiSpyware: http://download.cnet.com/SuperAntiSpyware-Free-Edition/3000-8022_4-10523889.html .

    Avast Antivirus: http://download.cnet.com/Avast-Free-Antivirus/3000-2239_4-10019223.html .

    Disk Defragging - install and run this app: http://download.cnet.com/Auslogics-Disk-Defrag/3000-2094_4-10567503.html .

    Startup programs - install this application, then select start only the programs you need to run at startup, as your antivirus, firewall, but not your Disk Defragmenter (examples):

    Splash Guard: http://download.cnet.com/Startup-Guard/3000-2239_4-10958203.html.

    Also, your system's drivers are up-to-date? Updated the driver can also slow down your system. Go to HP.com and insert the complete your laptop model number in the search box to find your latest drivers.

    Let me know if these speed up your pc.

    Kind regards

    BearPup

  • I cancel my last two months, but they still took the money from my Bank.

    I cancel my last two months, but they still took the money from my Bank.

    I cancel my plan finally two month, but they always took the money from my Bank.

  • Help, please! I paid already two months but on my desktop applications remain in test mode! On my laptop no problem...

    Help, please! I paid already two months but on my desktop applications remain in test mode! On my laptop no problem...

    The trialversions are now closed, so I can't use any program now. It's very urgent, because I need PS for my work!

    Help links they send me, does not at all...

    Can someone help me please...

    Hi Bram,

    Please check your host files:

    trialversions?

    I hope this helps.

    Concerning

    Megha Rawat

  • Hi hope someone can help? I have acrobat pro, 6 have worked well for the past two years but then just stopped working. Have reinstalled but still won't open, ronning windows 7. Help please!

    Hi hope someone can help? I have acrobat pro, 6 have worked well for the past two years but then just stopped working. Have reinstalled but still won't open, ronning windows 7. Help please!  Janice

    Hey janicem42177174,

    Adobe does most support the installation and use of Acrobat 6 because it is a very old version that is not compatible with Windows 7.

    I suggest you to please use the latest version of Acrobat 11.0.10 is perfectly compatible with your operating system with its functions and improved functions.

    You can download a free trial version of 30 days of Acrobat from here:

    Download Adobe Acrobat free trial | Acrobat Professional XI

    Let me know how it goes

    Kind regards

    Ana Maria

  • difference between 2 types of different plan account members

    Can you find the difference between the dimension members account source with as 2 different plan types. Among the type of plan has also 2 extra dimensions.

    You should be able to do so until one of the accounts is ALSO present in the other account stored in the type of plan. So probably Acc.member2
    can be affected to have a 'plan Source Type' plan 2, but also be selected to appear in the level 1 when you change the Acc.member2 account in the web planning application. Planning would allow the account to appear in plan 1 via an XREF on the definition of member account in Essbase).

    Then in plan 1 that you would create a third account that calculates the difference between the 2.

    You would be able to analyze the variance by the dimensions in plan 1 (i.e. D1, 2, 3, & 4: plan of these dimensions common to both types)

    Hope this helps

    Published by: Xansaman on November 25, 2010 16:26

  • Impossible to use two af:tables with different colors (skins)?

    Im trying to configure the Siebel self-service application and customize the counting. I have a few problems, because I need to show two af:tables on the same page, but with different colors. One with black background and white text (header and body) and the other with white background and black text. I tried to use styleClass: are, but the css settings defined for the table of the af are the substitution of those mentioned in the style sheets.

    Anyone with an idea how to solve this problem?

    Thank you
    / Jon-Erik

    Hello

    If the styleClass name is table1 then the skin selector would be something like

    .Table1 af | table

    mul afTable.af: table

    I don't see how this can be overloaded. If you hypothesis is that the style class reference must be to a definition of CSS on the page, then indeed, it does not. The styleClass name is an identifier of type named for the skin component and is used to describe more the component skin

    Frank

  • I recently bought Empires one and two years, but I can't seem to install or to come on my computer

    I recently bought Empires one and two years, but I can't do either to install orcome upward on my computer on my vista or 7 computers laptop anyone can help please?

    Hello

    1 did you change on your computer?

    2 did you receive an error message?

    Method 1:

    I suggest to perform the clean boot and then try to install.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: After a repair, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    Method 2:

    I also suggest you to follow the link and check.

    Problems installing and uninstalling programs on Windows computers

    http://support.Microsoft.com/kb/2438651

    Method 3:

    I also suggest you to follow the link and check.

    Make older programs in this version of Windows

    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows

    How to troubleshoot program compatibility issues in Windows Vista

    http://support.Microsoft.com/kb/927386

    See also:

    The problems of the game performance

    http://Windows.Microsoft.com/en-us/Windows7/fixing-game-performance-problems

Maybe you are looking for