10.2.0.4 behavior of CBO without histograms and lie / literals

Hello
I have a question about the CBO and collected LOW_VALUE and HIGH_VALUE statistics values. I saw the following on a database of oracle 10.2.0.4.
CBO decides a different execution plan, if we use the bind variable (without bind peeking) or literals - no histograms do exist on the columns of the table.
Unfortunately I have no export statistics to reproduce this behavior on my test database, but it was 'something' like that.

Environment:
-Oracle 10 g 10.2.0.4
-Bind peeking disabled (_optim_peek_user_binds = FALSE)
-No histograms
-No partitioned table/index

The table (TAB) has 2 indexes on it:
-An index (INDEX A1) included the date (which was a NUMBER column) and the values in the columns of this spread of 0 (LOW_VALUE) up to 99991231000000 (HIGH_VALUE).
-An index (INDEX A2) included the number that has been very selective (separate keys almost the same num lines)

The query now looks like this:
SELECT * FROM TAB WHERE DATE BETWEEN :DATE1 AND :DATE2 AND ARTICLENR = :ARTNR;
And calculated the CBO, the best execution plan would be a scan interval index on two indexes and perform a btree-to-bitmap conversion... compare the row ID returned the two indexes and then access the table TAB with that.
What the CBO didn't know not (because of the handicapped stealthily) was, that the user has entered (= 0) of DATE1 and DATE2 (= 99991231000000)... so the access index index A1 makes no sense.

Now, I run the query with literals just to DATE... so the query looks like this:
SELECT * FROM TAB WHERE DATE BETWEEN 0 AND 99991231000000 AND ARTICLENR = :ARTNR;
And then the CBO has made the right choice... just accessing index A2 which was very selective, then acceesed table TAB by ROWID.
The query has been much faster (factor 4-5) and the user was happy.

As I already mentioned, there is no historgrams that I was very surprised, the execution plan changed due to the use of literals.

Anyone know what the CBO includes HIGH_VALUE and LOW_VALUE values in its calcuation of execution plan?
So far, I thought that these values will be used only in the case of histograms.

Thanks and greetings

oraS-

It's in the Oracle cost-based book Fundamentals of Jonathan:

Page 51/52-

Case No. 14:

"month_no between: b1 and: b2.

«The optimizer simply defines the selectivity to 0.25% (which is in fact 5% of 5%).» {} quote}

That's what I said in my post above. The literal form of selectivity is box 5 on page 53.

HTH!

Tags: Database

Similar Questions

  • open pdf file without change and ask to register [SharePoint]

    Hi, I'm doing migration Domino doc to Sharepoint 2010 migrated under MS Word. When I come to the SharePoint click here to see the pdf attachment in the document, I encountered this message asking me to save. I did not change the document, while browsing through the attachment to check if everything is successfully migrated. To the user, it will be very painful because it just open pdf without change and ask to record every time. Is there no work around for this problem? What is the behavior of MS Office?

    Hello

    The question you posted would be better suited to the TechNet community. Please visit the link below to find a community that will provide the support you want.

    Hope this information is useful.
  • Inconsistent behavior of focusLost with JTable and JTree

    Swing has known problems for a long time with the cells and the loss of the thematic demonstrations in the JTables. Generally, users expect loss of focus to commit their changes rather than cancel the change. Then edit controls (for example, JTextFields) located in CellEditors should generally be listeners of update and manage focusLost() by calling cellEditor.stopCellEditing (). It is very clear.

    JTables to have an additional, special problem associated with a generation (or not) of focus events when moving from one cell to another cell in the same table. To do this, the code that creates the JTable needs to call table.putClientProperty ("terminateEditOnFocusLost", Boolean.TRUE). Setting this property to 'magic' on the table allows expected behaviors Assembly when moving from cell to cell.

    These issues are well described here: http://tips4java.wordpress.com/2008/12/12/table-stop-editing/

    I've set up the property of the client and the listener to focus, and they perform as expected in most cases. But I seems to have discovered a third case that is not managed by one of these two known workarounds.

    We have a design of the user interface master/detail where the master is a tree control and retail is the JTable of editable cells. The (master) JTree and JTable (detail) are each cashed in the JPanels which are in turn greeted in an enclosing JPanel.

    If I am editing within a cell and click completely outside this hierarchy - for example, in the menus of the main application bar - the focusLost() is managed and the change is committed, as you wish. And if I click anywhere in the JTable, also commits the change.

    But if I'm editing a cell and choose the JTree specifically, the change is aborted.

    I added logging for focusLost() Manager. I found that in the majority of cases, for example when clicking on menus or other completely different control bar, table.isEditing () returns TRUE for the JTable both focusLost() Manager is running. Because the change is running, the Manager is capable of broadcasting of stopCellEditing() and validate the user change.

    But when I click on the outside for the JTree specifically, then in focusLost() Manager I find isEditing() is WRONG - that is, the change has already been cancelled and there is no way to recover already cancelled user input. The text field focusLost Manager pointed out that 'the opposite element' (wins the focus) is a JTree control as expected.

    So it seems that something either the JTree or the locking hierarchy Panel made a subtle change to the behavior of the focusLost(). And therefore bypasses of modification of standard tables do not fully work in our application. And unfortunately, clicking on cells change directly in the tree turns out to be a common case in our design of the user interface. Failing to validate the edition in this case with bad consequences that should be fixed.

    Any suggestion would be appreciated. Note: the question is similar to related to this issue:

    JTree does not call focusLost on headphone

    but the tail wire. I concede that I'm not provide code either and he can't promise right now.
    - - -
    Jeff

    Rainmaker says:
    Right now seems to be a lot to a precise definition of the terms so I ask this question with regard to the docs.

    good start :-)

    >

    You wrote:

    invokesStopCellEditing and terminateEditOnFocusLost set up different behaviors, without overlap.

    Yes, I did, it meant and still means he

    >

    The setInvokesStopCellEditing() docs say:

    + Determines what happens when the edition is interrupted by selecting another node in the tree, a change of data of the tree, or by other means. Setting this property a value of true causes changes to be automatically saved when editing is stopped. +

    Well, your fat is your old problem: assumptions yet ;-) My focus is

    + Determines what happens when the change is interrupted by selecting another node in the tree, a change of data of the tree, or by some other means.

    And which is supported by reading on:

    
         * @param newValue true means that stopCellEditing is invoked
         *        when editing is interrupted, and data is saved; false means that
         *        cancelCellEditing is invoked, and changes are lost
    

    in the total sense: he's interrupted (whatever that means, no conclusive specification except this model or the selection change), this propterty determines whether editing is stopped or cancelled. Conversely: if it is not interrupted, the property has no effect.

    Do you mean that the part of the sentence by other means does not include loses focus? I have to disagree. Of course loses focus is a "way" to interrupt the editing.

    Nothing to accept or not: is done, it's the 'interrupt' that matters. Obviously (although without doubt) lose focus don't consider an interruption - nothing happens when moving the cursor somewhere else, neither commit nor cancel.

    So if invokesStopCellEditing is defined, and the tree loses focus, it should save your work. And that's why the invokesStopCellEditing overlap with terminateEditOnFocusLost.

    just to drive home ;-) - the item no.

    >

    Note that I stick to the definition in the docs.

    No, you interpret the doc to fit your expectations.

    I did an example code and checked the validation works when the tree loses focus.

    You should have (it's a two-liner to add to your example) - see the divergence of expectations and reality, rethink your accession ;-)

    In which case it's bugged, because the docs say it should.

    In fact, I don't think it is (as you may have guessed so read up to here ) the text doc of course is not as easy as it could be, as is unfortunately a habit running in the swing. Assuming that means it that you wait that means is a trap. My general advice is to read the documentation of the api carefully and until its end and then check against the actual behavior expectations. The advice to take it or leave it - your choice, of course.

    CU
    Jeanette

  • Is there a way to access the start page of Thunderbird without disconnection and insert it again?

    I would like to be able to access the start page of Thunderbird at random times, without disconnecting and then insert it again.

    Is this possible?

    Under the GO menu is PAGE of STARTING PRINCIPAL.

    The shortcut is alt + home page.

  • After stopping Firefox opens again without history and previous tabs

    Before each trip, I quit Firefox 31 my Mac Pro 10.9.4. He had several extensions, bookmarks and open tabs. I've done this hundreds of times without problem and Firefox always opens with everything intact. Then I stop my Mac.

    This time, on return, I started my Mac, clicked on Firefox to open it, and it opened as a blank Firefox version. He was still Firefox 31, but all my extensions have disappeared, my story was gone, clearly my Session Manager had disappeared and all my previously opened tabs disappeared.

    How can I recover the Firefox I have quit smoking before I stop my Mac? P

    COR - el,
    I was able to recover a backup off site of the cloud of August 4. I see two similar 9kn2yszu.default and 9kn2yszu.default\searchplugins profiles

    The profiles.ini only uses the first profile. It turns out that this same profile is one of the two that exists on my Mac. But it doesn't have the same content!

    A profiles.ini made an appearance on my Mac now.

    I was thinking about copying and pasting the contents of my backup profile to replace content in my current of the same name, as per profile

    https://support.Mozilla.org/en-us/KB/back-and-restore-information-Firefox-profiles

    I was going to wait for your ok, but I guess I can't do more damage that I have, so I'm going to come.
    . . . . . . . .

    Well I did, and it seems to have worked. I have all my tabs back and two windows of Firefox using Session Manager which is also back back.

    I mark this solved when I get your comments and if you can suggest this as another profile, 9kn2yszu.default\searchplugins, is on about. Should I copy it to my profile as well?

    I realize that my Time Machine backups were not corrupted by them open at the same time as the Finder on my Mac. Patterns were the same, but the content of this profile of August 6 looks at the content of the profile of the same name by August 4 I used. But, the same file, just before I made my copy and paste had lost almost half of its elements.

    It could be a good idea if Firefox was a way to save their profiles automatically to another file somewhere else. This doesn't happen often, but I lost only several precious hours over the past three days to get it resolved.

    Thanks again, for help.

    George

  • I get a strange behavior of the bar tabs and the address bar in Firefox 29,0 for Mac.

    I just installed Firefox 29,0 for Mac.
    I have a strange behavior of the bar tabs and the address bar with this new version.
    Instead of the address bar, I get two rows of symbols. And it is impossible to write anything in the address bar.
    (I add a screenshot, but I can't find a way to do it).

    Firefox has an RSS icon in the palette of the toolbar that you can drag a toolbar (but not on the location bar container).

    • Firefox menu button > Options/Preferences > toolbars
    • View > toolbars > customize
  • Tecra S2: strange dots on the screen that appears without reason and randomly

    Hello

    I have a laptop Toshiba Tecra S2 for almost a year now.
    I formatted 2 months ago and when I did it. I had strange spots on my screen, appearing without reason and at random. I have not the slightest idea where it came from and I tried to format my computer again.
    I installed the latest driver chipset on the site of intel, and then I installed the latest driver on the toshiba site.

    I noticed that the problem is back. so that solves nothing. What can I do about it?

    PS, not only the points, but I can't play too.

    HI Jelle,

    When you say that you have formatted your laptop, you completely re - install the operating system from the recovery discs? If you did then the display should work fine.

    If you have installed the Microsoft disk operating system, you will need to download the correct drivers from Toshiba for your Tecra from Toshiba download page web site.

    Kind regards

  • Strange behavior. 2590 relay switch and Get position vi.

    I'm reading a PXI2590 1 x 4 MUX switch relays that I fires only when necessary. I know the names of the relays are MUX01, MUX23 and MUX0123. If I switch, niConnect channels INIT, wait Debounce and can get the Position of the relay, I get a correct reading (closed or open). I then called niSwitch close .vi and the switch remains in this position.

    However if I just called INIT, niSwitch getting the Position of relay and close vi seems the selector to a different value (default?). I confirmed this behavior using a HF generator and Analyzer of spec.

    Is what I do with these evil vi? Can I use DAQmx driver for this switch instead?

    LabVIEW 8.5.1

    OR-Switch 3.70.49152

    NOR-DAQmx 8.7.1f2

    NOR-PXI-2590

    Hello GovBob,

    Correct me if I'm wrong.  First you call OR-SWITCH boot (not initialize with topology) or initialize options with the 'reset device' Boolean is unwired? (which means reset = true)

    Then, in a case: call OR-SWITCH connect channels, wait OR-SWITCH Debounce, OR-SWITCH get relay post, then NOR-SWITCH close (close a session, not close relay).  Then physically measure opens or shorts.

    In the other case: appeal OR-SWITCH get relay post, then NOR-SWITCH close.  Then physically measure opens or shorts.

    The results are the second case has openings (ch0 is connected to the com).  This is expected behavior since the indicator 'reset the device' in one of the screws initialize is TRUE if left thread continues.  However, if you physically measure different values compared to what OR-SWITCH get post is back, so please submit your screws and a list of the steps and the values measured for each stage.  I hope this helps!

    -Jordan

  • Weird behavior with Signal to simulate and loops

    I'm having a weird behavior with Signal to simulate and while loops. Attached a photo of my program. The problem I have is that when I use Stop to stop inside while loop, then use to restart the inner loop, simulate Signal instantly generates a bunch of points of data between when I pressed Stop and Go. By example, if I stop for 5 seconds, wait 5 seconds, then press Go, it will instantly generate data for t = 5 t = 10. What I need is for the generation of signals to stop when I press stop and continue where it left off when I press Go. How can I accomplish this? I have no idea why he exhibits the behavior described in the first place.

    Hi optometry.

    Can you give us a screenshot of the configuration window for the VI express to simulate signal? I was able to reproduce the problem when I used "Simulate the time of acquisition" at times, but the VI's are featured as you described you wanted when I used "run as fast as possible." Have you tried this setting?

  • I tried to send an email with attachment and without attachment and received the "windows live Hotmail was not able to complete this application. "Microsoft may contact you about problems that report you.

    I tried to send an email with attachment and without attachment and received the error "windows live Hotmail was not able to complete this application. "Microsoft may contact you about problems that report you.

    Hi AbdiNur,

    This forum is for comments on the Microsoft Answers site.  As your question is on Hotmail, I recommend posting your question on the forums for Hotmail:

    http://www.windowslivehelp.com/forums.aspx?ProductID=1

    Thank you for using Microsoft Answers!

  • How to surf style of plain text (without image and effects) that is lite browser

    I want to browse the internet without image and styles

    I don't know what you hear by a browser 'lite', but if you want a text-only browser, try Lynx.

    Description of browser lynx--> http://en.wikipedia.org/wiki/Lynx_%28web_browser%29

    Download--> http://lynx.isc.org/

    Instructions--> http://www.vordweb.co.uk/standards/download_lynx.htm (has links to download an earlier version, but you don't have to learn how to make the installation as you would from the download page)

  • USB modem stop working after long time and I have to unplug then plug it in again, I want to solve this problem without unplugging and plug?

    USB modem stop working after long time and I have to unplug then plug it in again, I want to solve this problem without unplugging and plug?

    Hi ahmedman_10,

    ·         You follow the steps in the article of my previous answer?

    Follow these steps in my previous answer and at the same time this article, follow these methods.

    Method 1: Follow the steps in the article.

    USB port may stop working after you remove or insert a USB device

    Method 2: Update the latest drivers for chipset.

    How to manage devices in Windows XP

    For reference:

    Why my computer does not detect my new USB device when I run Windows XP or Windows Server 2003?

  • I received an email from my address in my junkbox subsequently, I deleted without opening and tried to block without result. Is what kind of scam or virus?

    An email from my address!

    I received an email from my address in my junkbox subsequently, I deleted without opening and tried to block without result. Is what kind of scam or virus? How is it hotmail allows this weird deliveries?

    Hello

    Answers is a peer group supported and unfortunately has no real influence on Hotmail.

    HotMail has its own Forums, so you can ask your questions there.

    Windows Live Solution Center - HotMail - HotMail Forums Solutions
    http://windowslivehelp.com/

    Hotmail - Forums
    http://windowslivehelp.com/forums.aspx?ProductID=1

    Hotmail - Solutions
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    How to contact Windows Live Hotmail Support
    http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htm

    Windows Live Hotmail Top issues and Support information
    http://support.Microsoft.com/kb/316659/en-us

    Error message "your account has been locked" when trying to connect
    http://windowslivehelp.com/thread.aspx?ThreadId=77be7d82-a0e9-49c7-b46d-040ec654a9e2

    Compromised account - access unauthorized account - how to recover your account
    http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41

    Hotmail hacked? Take these steps
    http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspx

    ============================================================

    Proceed to a very thorough check for malware and then change your password by e-mail.

    It is possible for a person to send the email that 'seems' to be of your
    account but that is not really - called "Spoofing." That means its 'Possible' emails
    were not really you, although they may have your contact list. Have someone
    who receives the e-mails to check the header to see where he is actually sent by and
    NOT only the answer to the address.

    How to read the message headers
    http://www.emailaddressmanager.com/tips/header.html

    What Email Headers can tell you about the origin of Spam
    http://email.about.com/cs/spamgeneral/a/spam_headers.htm

    E-mail spoofing
    http://en.Wikipedia.org/wiki/E-mail_spoofing

    E-mail spoofing and Phishing
    http://www.mailsbroadcast.com/email.broadcast.FAQ/46.email.spoofing.htm

    Understanding E-mail Spoofing
    http://www.windowsecurity.com/articles/email-spoofing.html

    Fraudulent emails (false)
    http://pages.eBay.com/education/spooftutorial/

    Google search - email Spoofing
    http://www.Google.com/search?hl=en&EI=FB1nS9DiNo7CsQPNhKGdAw&SA=X&Oi=spell&resnum=0&CT=result&CD=1&ved=0CAgQBSgA&q=email+spoofing&spell=1

    =============================================

    If you need search malware here's my recommendations - they will allow you to
    scrutiny and the withdrawal without ending up with a load of spyware programs running
    resident who can cause as many questions as the malware and may be more difficult to detect as the
    cause.

    No one program cannot be used to detect and remove any malware. Added that often easy
    to detect malicious software often comes with a much harder to detect and remove the payload. Then
    its best to be thorough than paying the high price later now too. Check with them to one
    extreme overkill point and then run the cleaning only when you are sure that the system is clean.

    It can be made repeatedly in Mode safe - F8 tap that you start, however, you must also run
    the regular windows when you can.

    Download malwarebytes and scan with it, run MRT and add Prevx to be sure that he is gone.
    (If Rootkits run UnHackMe)

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Malwarebytes - free
    http://www.Malwarebytes.org/products/malwarebytes_free

    Run the malware removal tool from Microsoft

    Start - type in the search box-> find MRT top - right on - click RUN AS ADMIN.

    You should get this tool and its updates via Windows updates - if necessary, you can
    Download it here.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN
    (Then run MRT as shown above.)

    Microsoft Malicious - 32-bit removal tool
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=AD724AE0-E72D-4F54-9AB3-75B8EB148356&displaylang=en

    Microsoft Malicious removal tool - 64 bit
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=585D2BDE-367F-495e-94E7-6349F4EFFC74&displaylang=en

    also install Prevx to be sure that it is all gone.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Prevx - Home - free - small, fast, exceptional CLOUD protection, working with others
    security programs. It is a single scanner, VERY EFFICIENT, if it finds something to come back
    here or use Google to see how to remove.
    http://www.prevx.com/   <-->
    http://info.prevx.com/downloadcsi.asp  <-->

    Choice of PCmag editor - Prevx-
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

    Try the demo version of Hitman Pro:

    Hitman Pro is a second scanner reviews, designed to save your computer from malicious software
    (viruses, Trojans, rootkits, etc.). who infected your computer despite safe
    what you have done (such as antivirus, firewall, etc.).
    http://www.SurfRight.nl/en/hitmanpro

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

    If necessary here are some free online scanners to help the

    http://www.eset.com/onlinescan/

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

    Original version is now replaced by the Microsoft Safety Scanner
    http://OneCare.live.com/site/en-us/default.htm

    Microsoft safety scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

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

    http://www.Kaspersky.com/virusscanner

    Other tests free online
    http://www.Google.com/search?hl=en&source=HP&q=antivirus+free+online+scan&AQ=f&OQ=&AQI=G1

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

    Also follow these steps for the General corruption of cleaning and repair/replace damaged/missing
    system files.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type this into the search-> find COMMAND to top box and RIGHT CLICK-
    RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker
    (SFC.exe) program generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Run checkdisk - schedule it to run at the next startup, then apply OK then restart your way.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

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

    If we find Rootkits use this thread and other suggestions. (Run UnHackMe)

    http://social.answers.Microsoft.com/forums/en-us/InternetExplorer/thread/a8f665f0-C793-441A-a5b9-54b7e1e7a5a4/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • When using Sky go and try to watch movies or programs how do I get to run continuously without interruption and catch every few seconds.

    Go to sky

    When using Sky go and try to watch movies or programs how do I get to run continuously without interruption and catch every few seconds.

    The usual cause of this is that your broadband connection is not fast enough or you have multiple computers, try to use it at the same time.

    This allows to check your speed broadband http://www.bbc.co.uk/iplayer/diagnostics#results

    If the broadband speed does not seem to be the problem, please contact Sky

    http://helpforum.sky.com/T5/using-Sky-go/BD-p/skygo_using

  • I'm looking for (without wire and ati) drivers sony vaio model pcg - 61611 L 27524236 3006912 .SN

    I'm looking for (without wire and ati) drivers sony vaio model pcg - 61611 L 27524236 3006912 .SN

    Hello Jazymich,

    Thanks for the post.

    PCG - 61611L is the configuration of the equipment donated by Sony code.

    Try to exactly locate the model #:

    http://eSupport.Sony.com/us/p/support-info.pl?info_id=264#notebook

    Enter model # in the following link for available drivers:

    http://eSupport.Sony.com/us/p/select-System.pl?Director=driver

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

Maybe you are looking for

  • I have a code 10 error when I insert my SD card. How can I fix it?

    I have a code 10 error when I insert my SD card.  I click on update driver, to connect to windows update, but it cannot complete.  Is there any solution for this?  I reinstalled windows a few months ago SD card worked fine until a few days ago.  Than

  • Recommendation for 4 GB of RAM for dv-6

    My dv6 - 2154ca has a 8 GB maximum RAM list, but the two slots are full (I think there are only two).  But when I visit the HP website for parts it lists only 2 GB of RAM modules.  How will I know what 4 GB modules are adapted and used Sub my warrant

  • Loading screen is not animated, during the operation, but after

    Hi all! Here's my problem: I am display a gif animated using the class presented here. It is used in a specific class loader that perform an action, while the gif is displayed (the gif is a spinner). Only once the operation is completed, the LoadingS

  • Icon lost bbm blackBerry Smartphones after update 6.1.0.71

    Hi, first of all, I am new to blackberry, then so not know much about them, I bought my 9800 on network o2 uk a few weeks ago, until this morning everything was fine, when I updated messenger blackberry to v.6.1.0.71, once rebooted I had lost my bbm

  • Unable to set authentication of IPSec with RADIUS clients

    Hello I configured the VPN IPSec server for remote clients on Cisco 2811 with XAuth (see attached cisco vpn configuration). Initially, I configured clients extended authentication (Xauth) using a local database of IOS users and it worked fine, but th