11 GR 2 - use of the causes of the different results

Hi people,

As far as I KNOW, the indicators to help the optimizer, but here I get unexpected results different, can someone tell me why?

SQL > @s.sql-> I removed the tips here.

E DN_START DN_END DN_LENGTH ROUTING_ RD_ID MORE NVL(DONOR_ID,0) NVL(PORT_ID,'') N NVL(URI,'')

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

O 524494420000 524494429999 12 156 309 0 F

S 525518855506 525518855506 12 188 318 336 M

SQL > @s2.sql

E DN_START DN_END DN_LENGTH ROUTING_ RD_ID MORE NVL(DONOR_ID,0) NVL(PORT_ID,'') N NVL(URI,'')

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

6862880058 6862880058 10 090 493 0 M O

9845198440 9845198449 10 189 319 S 0

Here is the content of the scripts:

SQL >! s.SQL vi-> without advice

SELECT entry_type, dn_start, dn_end, dn_length, routing_number, rd_id, nvl (RNA, ' ') additional_routing_number, nvl (donor_id, 0), nvl (port_id, ' '), nvl (number_type, ' '), nvl (uri, ' ')

FROM (select dr.entry_type, dr.dn_start, dr.dn_end, dr.dn_length, rn.routing_number, routing_number, rn.rd_id, arn rn_add.routing_number, dr.donor_id, dr.port_id, dr.activation_date, dr.number_type, Dr. np_dn_range, np_routing_number, np_routing_number rn_add rn dr.uri where (((dn_start < = 525543293960 et dr.rn_id=rn.id) and dr.entry_type s = ') and dr.additional_rn_id = rn_add.id (+)) and rownum < 11)) where (activation_date < = sysdate and rownum = 1) union select entry_type , dn_start, dn_end, dn_length, routing_number, rd_id, nvl (RNA, ' ') additional_routing_number, nvl (donor_id, 0), nvl (port_id, ' '), nvl (number_type, ' '), nvl (uri, ' ') from (select dr.entry_type, dr.dn_start, dr.dn_end, dr.dn_length, rn.routing_number, routing_number, rn.rd_id, rn_add.routing_number RNA, donor_id null, null port_id, dr.activation_date, dr.number_type, np_dn_range Dr. inf. np_routing_number dr.uri ((, np_routing_number rn_add where (((dn_start < =525543293960 et dr.rn_id=rn.id) and dr.entry_type = 'O') and dr.additional_rn_id = rn_add.id (+)) and < 11 rownum))

WHERE (activation_date < = sysdate and rownum = 1);

SQL >! s2.SQL vi-> with notes

SELECT entry_type, dn_start, dn_end, dn_length, routing_number, rd_id, nvl (RNA, ' ') additional_routing_number, nvl (donor_id, 0), nvl (port_id, ' '), nvl (number_type, ' '), nvl (uri, ' ')

FROM (select / * + ORDERED INDEX_DESC (dr np_dn_rng_dal_idx) INDEXES (rn np_rn__pk) FIRST_ROWS * / dr.entry_type, dr.dn_start, dr.dn_end, dr.dn_length, rn.routing_number, routing_number, rn.rd_id, arn rn_add.routing_number, dr.donor_id, dr.port_id, dr.activation_date, dr.number_type, Dr. np_dn_range, np_routing_number, np_routing_number rn_add rn dr.uri where (((dn_start < = 525543293960 et dr.rn_id=rn.id) and dr.entry_type s = ') and dr.additional_rn_id = rn_add.id (+)) and rownum <) (11)) where (activation_date < = sysdate and rownum = 1) union select entry_type, dn_start, dn_end, dn_length, routing_number, rd_id, nvl (RNA, ' ') additional_routing_number, nvl (donor_id, 0), nvl (port_id, ' '), nvl (number_type, ' '), nvl (uri, ' ') from (select / * + ORDERED INDEX_DESC (dr np_dn_rng_dal_idx) INDEXES (rn np_rn__pk) FIRST_ROWS * / dr.entry_type dr.dn_start) ((, dr.dn_end, dr.dn_length, rn.routing_number, routing_number, rn.rd_id, rn_add.routing_number RNA, donor_id null, null port_id, dr.activation_date, dr.number_type, Dr. np_dn_range, np_routing_number, np_routing_number rn_add rn dr.uri where (((dn_start < =525543293960 et dr.rn_id=rn.id) and dr.entry_type = 'O') and dr.additional_rn_id = rn_add.id (+)) and < 11 rownum))

WHERE (activation_date < = sysdate and rownum = 1);

Blue: I replaced a variable binding.

Red: The advice I removed in s.sql

I use 11.2.0.3 EE 64-bit on SunOS 5.11.

Thank you!

Advice does not have the undeterministic... request advice are trying to force the part of the implementation plan (it can work or not).

Rownum without prescription actually query undeterministic (also stopped by should be made on the subquery as indicated by SomeoneElse).

Also order by does not automatically make the deterministic output: the columns in the order by should cover the columns that identify the result set.

Same problem can be met with analytic functions.

Sometimes you see also developer relying on the UNION ALL to get the orderly output, which can be for example with parallel reading.

...

Tags: Database

Similar Questions

  • WebDAV: use of the different logins to different WebDAV folders on the same server

    Hello

    I quite often use WebDAV to access the various folders on a server on the Internet. I do this "Add a network location" in Windows Explorer, then using the address https Server (for example https://www.myserver.com/folder1). The first time that I need to enter the credentials of the user and the corresponding password and Windows seems to store them somewhere so that I can connect to this folder also after a re-login without having to re - insert my credentials.

    The question I have, is that I also need access to different folders on the same server (for example https://www.myserver.com/folder2) that requires different user credentials and passwords. The only way I have found is to remove the first network location, disconnect and reconnect to the Windows and then add the new location of the network in Windows Explorer; Just delete the first network location and adding the second network location would not be enough that Windows had always stored the context of the 1st network location and tried to connect with the credentials of the user and the password of the 1st second.

    Question: is there a less cumbersome way to remove context from a WebDAV connection, so that I do not need to disconnect and reconnect if I need to connect to the same server with different user credentials?

    Thank you very much

    Johannes

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Use in the different window buttons to quick launch

    I am new to Hp support forums, so please excuse the typos. I would like to know if it is possible to have iTunes running in the background and skip, play, and pause songs when I'm in another window for example. Firefox. I downloaded lastest drivers but it did nothing, my friend who has a dell XPS 16 is able to do. Any help would be greatly appreciated.

    Thanks Matt

    Hello

    Here is a link to a web of hp document that should help to understand the use of a configuration and programming of your laptop quick launch feature.

    Kind regards

    ERICO

  • Installation and use of the different software on different computers to Master collection at the same time

    Question:

    If I buy the "Adobe Creative Suite 6 Master Collection,"

    Can I install and use different software on different computers at the same time?

    example:

    Can I use photoshop cs6 on 1 machine

    and then illustrator cs6 on machine 2

    and then indesign cs6 on machine 3

    simultaneous all?

    Thank you

    # It is not possible. You have 2 activations that are valid for all applications and that's all. Read the EULA

    Mylenium

  • Filtering based on fact columns makes the different result?

    Dear all,

    I have an analysis report for the editor, there are several columns, for example,

    Col A = ROUND(Col B * Col C / Col D, 0) while Col B, C of neck and neck D are integers

    Col E = ROUND(Col F * Col C / Col D, 0) as Col F, C of neck and neck D are integers

    Filter: G Col is not null, while G Col is made column, whole

    I have the case, it is only

    Col B = 120, Col C = 4, Col D = 14, Col F = 10

    If the filter is not applied:

    Col A = Round (120 * 4/14, 0) = 34

    Col E = Round (120 * 10 / 14, 0) = 86

    When the filter is applied,

    Col A = Round (floor (120 * 4/14), 0) = 34

    Col E = Round (floor (120 * 10/14), 0) = 85

    C

    If you want to avoid the floor use function (120 * 10/14.0)

    If all the values of a division are integers, OBIEE automatically uses a Floor function.

    SO GET the numerator or the denominator to DOUBLE, then on run your calculations, the floor function will not apply.

  • Length of the different interval between two dates in SQL/PLSQL

    Dear gurus, here are three questions to ask:
    1. Why is the result queries are different?
    2 - is a way to measure the length of the interval in seconds (L) between two dates?
    2. why the different result is generated in SQL and PL/SQL only to subtract dates from the 28th day of the month?

    declare
    number of l_offset;
    Start
    l_offset: = (to_date('09-nov-2009') - to_date ('28.10.2009 10:40:03 ', ' dd.mm.yyyy hh24:mi:ss')) * 86400;))
    dbms_output.put_line (l_offset);
    l_offset: = (to_date('09-nov-2009') - to_date ('27.10.2009 10:40:03 ', ' dd.mm.yyyy hh24:mi:ss')) * 86400;))
    dbms_output.put_line (l_offset);
    end;
    998396.9999999999999999999999999999999997
    1084797


    Select (to_date('09-nov-2009') - to_date ('28.10.2009 10:40:03 ', ' dd.mm.yyyy hh24:mi:ss')) * double 86400))
    Union of all the
    Select (to_date('09-nov-2009') - to_date ('27.10.2009 10:40:03 ', ' dd.mm.yyyy hh24:mi:ss')) * double 86400))
    (TO_DATE('09-NOV-2009')-TO_DAT
    998397
    1084797


    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    PL/SQL Release 9.2.0.7.0 - Production
    CORE 9.2.0.7.0 Production
    AMT for Linux: release 9.2.0.7.0 - Production
    NLSRTL Version 9.2.0.7.0 - Production

    Hello

    Sorry, I'm still not sure you understand the question.

    You wonder why the rounding error is apparent to 6 digits to the left of the decimal separator in numbers, but not in number 7 digits to the left of the decomal? The answer is itself a rounding error.
    When Oracle is the arithmetic mean of the dates, the result is a fraction that cannot be stored in a binary number, such as preciesly
    998396.9999999999999999999999999999999996857... it it rounds to the nearest value it can store, such as
    998396.9999999999999999999999999999999997. in other words, it can store 40 digits. In this case, 6 figures to the left of the decimal separator and 34 of the figures to the right. The number is rounded to the nearest multiple of 10 ^-34 ^
    What happens if we add 86400 this number?

    
     998396.9999999999999999999999999999999997
    + 86400.0000000000000000000000000000000000
    ------------------------------------------
    1084796.9999999999999999999999999999999997
    

    Now we need 7 digits before the comma, then round the number to the nearest multiple of 10 ^-33 ^, which is
    1084797.000000000000000000000000000000000

  • Acquisition of images with 3 USB cameras causing too many uses of the memory/cpu

    Dear experts,

    I'm trying to capture images with 3 cameras USB, located in 3 different positions. I have to initialize each cameras using USB list vi camera when switching between cameras. I realize that, by making this method causing too many uses of the memory/cpu and can cause CPU hang up. If I stop the program, the memory/cpu counter are down.

    Do you know how to reduce this problem.

    Thank you

    Hart


  • This error is often caused by incorrect use of the "Strict" document type

    Well... so I still have 6 errors - and has to do with my type of document.

    I tried the code and I use a transitional doc type so why errors?

    http://02cada7.netsolhost.com/Stasik_Family_Website/index.html

    (Errors are caused by one) using the mce editor and its associated necessary markup on the page and b) the use of the tag for the Polish (good choice).  I'm not crazy on this page with an ocean of space available, but this small area of scroll for content, and I'm not crazy about his embedded in general.  But none of these errors will not interfere with the rendering of the page.

  • Any possibility using only the built-in GPU?

    Mac OS X 10.11.6

    MacBook Pro(Retina,15 ",2015 mid)

    With graphics cards AMD one dedicated

    I wonder if it is possible to use only the GPU integrated while playing games. Cause I discovered that some games are no need to use the AMD GPU, but it is automatically switched to the dedicated GPU and drains the battery.

    Hope there is a solution for this problem. Thank you!

    It is somehow a conditional scenario suggested in this article

    on how to make some graphics settings may remain in service, here:

    • Set performance on MacBook Pro - Apple Support chart

    • MacBook Pro: how determine what GPU is in use - Apple Support

    {These links seem to show older versions of material your model}.

    Don't know if there is a way hidden within the system to change the default to

    stay on the one you want to be the first choice; Maybe in the command 'terminal '?

    In any case...

    Good luck in this case!

  • using the same search terms on ebay, getting different results on firefox exploer

    using the same words to search on ebay for internet explorer, I get results more when I use ebay on FireFox > is cutting some of the results when using Firefox

    It is always possible that eBay is to differentiate between browsers and gives different results, based on previous visits.
    You can try to delete cookies in two browsers to see if it has an impact.

    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: "show the Cookies".
  • I use google search. When I click on a suggestion contained in the results tab of the search, I want it to open in a new tab and keep the search results in the original tab. How?

    For example, when I enter the search term "cabinets" and get a page/tab search results with suggestions such as Sears, JCPenney, or Amazon, I want to be able to click on Sears and open the Sears page in a new tab/page. I want to be able to close the tab to Sears and use the search results tab.

    Google offers a framework for this. What it does, it adds a HTML (target = "blank") statement to every result link, which causes Firefox to open in a new tab. If you uncheck the preference to divert new windows in new tabs, Firefox will then open the result in a new separate window.

    This preference is stored in a cookie, if you clear your Google cookies often, so you'll need to reset every time. You can do so here:

    https://www.Google.com/preferences

    (On this page, Google refers to a new window.)

  • Satellite P775 stuck program on the use of the disc a vast

    Hello

    I have a strange problem on my laptop Toshiba Satellite P775 program with Windows 7.

    The laptop boot from time to time, slow and heavy i/o operations (I can see it via the indicator disc to surveillance). Windows not crushed, but the heavy IO makes the laptop unusable.

    Recently I reinstalled Windows (return to factory settings), but the issue has not disappeared.

    A few words about 'stuck ':

    1. once the laptop has been cooled for a long time - more than 1 hour - never occurs during initial start-up.
    2. when a problem starts, it does not disappear after stopping and restarting the laptop
    3 is coming during the connection process (stuck when connecting)
    4. never happened to me when you work in "safe" mode
    5. Windows not crushed, the mouse is generally sensitive - just very heavy and slow disk access makes virtually every application unusable.

    * The most recent research (quite shocking to me): once it goes all in running, I tried to unplug the power cord, then plug it in then after a few seconds. To my surprise, the "disruption" caused by the power connectivity - caused the laptop back to normal.*

    No clue on how to debug and fix the problem?

    Thanks for the care,

    Max

    Hello

    In my opinion, there are different reasons for this.
    First reason could be a large amount of processes that are running in the background
    Theoretically, it could be possible that a process stresses the CPU and thus the performance of the laptop is slowing.
    A HARD disk problem can cause this kind of problems too.
    As you can see really hard to tell what could cause this problem.

    From my point of view, you should start by running processes.
    Use check the CPU in the Manager of tasks (tab CPU) while this problem occurs.

  • What is "media downloads" in respect of the use of the data?

    "" I noticed that ' downloads media ' take a huge part of the use of 3G data on my phone (usually 40 ~ 60% of the total use). No idea what it is, and other people see this kind of behavior?

    I deleted all the motoblur widgets (but note that they are running as a background service and it cannot be stopped...) and did not 'download' any sort of 'media' that I know

    Thanks in advance,

    Amidou

    Could be the market looking for updates. Try to turn off notifications in the market. I never noticed because I'm not. It would be nice to know if this does not cause the use of data. Let me know if this helps.

    johntywang wrote:

    "" I noticed that ' downloads media ' take a huge part of the use of 3G data on my phone (usually 40 ~ 60% of the total use). No idea what it is, and other people see this kind of behavior?

    I deleted all the motoblur widgets (but note that they are running as a background service and it cannot be stopped...) and did not 'download' any sort of 'media' that I know

    Thanks in advance,

    Amidou

    With regard to the use of the fuzzy data. Go into your menu-settings-Data Manager - provision of data-(ici vous pouvez désactiver les données de base et l'itinérance)-applications of blur and check the WiFi sync only to stop using the data and make it only use WiFi.

  • HP 15 Notebook PC TS: Freezing, blue screens and 100% use of the disk.

    I constantly freeze because of my pc is always 100% use of the disk. Due to the use of disk, it causes my laptop to a blue screen, I received the following information from the configuration of the system errors: Bad, kernal error in the data on the page, out of State driver. When the 100% disk usage, I use about 1 mb of space.
    I use a wireless internet connection.
     
    Before these problems have taken place that I had upgraded to windows 10, shortly after the use of disc started to go up more often eventually cause my laptop to blue screen. With the bsod, it says that my operating system could not be found, so I had to go back to windows 8 through factory reset. With my first boot on my factory reset, I was still having the same problem as before, but since then my errors and problems continue to increase.
    I hope to diagnose my problem and get help before it's too late.

    Hi Zinchy,

    Thank you for the update. Yes, you can run a test lying on the hard drive from the BIOS. Here is a link to guide you.  HP Notebook PC - hardware failures (10, 8 Windows) screening  If the hard drive test OK, I'll try the clean install of Windows 10. Please hold me.

  • Get blue screen. Reinstalled by the use of the recovery. Install IE6. Tried to re - install IE8. Does not accept. See below.

    Get blue screen.  Reinstalled by the use of the recovery.  Install IE6.  Tried to re - install IE8.  Does not accept.  The installation of SP3.  However, restart blue screen causes.  Able to install IE8.  Installed without windows updates.  I tried windows update on leOutilsmenu.  Cannot display the page.  Error #0x8007043C.  Expect the blue screen on the next reboot.  What should do?

    Hi Steve,.

    First of all, you seem to be under the misconception that a response is a response. On ths forum, an answer is an answer if it solves your problem. In this case I clearly have not solved your problem, and you should review my answers to "uncheck" them.

    IE6 does not work with this forum, and forum owners do not seem to appreciate how much of a problem, it's for people to re-setup of XP. I doubt they'll do something, even if they are aware of this gap.

    Go to your real problem, you can try Microsoft's solution for the HP patch...

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=23751

    Please let us know how you go.

    Tricky

Maybe you are looking for