How to force the optimaizer to stop using an index ?

Hello,
I have an index on a very large table and I want to see how the applications running on this DB handles a situation in which this index does not exists.
Therfore I have 2 options:
1. drop the index - but this is too risky as if i will need to recreate it , it will last forever and will result in long application downtime which I can not afford.
The test and Dev environments does not contain ammounts of data like the prodicution so its hard to predict from these environments.
2. the second option is Modify the index columns statistics (which I have done) giving it low NDV (number of diftinct values) -- but sadly this did not work.
when cheking event 10053 I see a the line "Using prorated density: [ 1/(2*num_rows) ] of col #n as selectivity of out-of-range value pred" which I guess meens the High value of the column is lower then the value given it the query ( I do not run statistics every day , the current statistics for all columns (execpt this one ) suits best and I do not want to handle plan changes . also it will take a lot of time to gather table stats on daily basis.
So - to make a long story short - how do I force Oracle to avoid using an index but continue builing it and without dropping it?
I can not use the 'NO_INDEX' hint as it will requre change in many Applications.
I don need something like NO_INDEX hint on system level.
I am using Oracle 10g Enterprise edition.
the optimaized_mode is set to COST BASED.
Thanks in advance for any help resolving this complicated issue.
Regards,
Amit Zor.
ADBA.

user3698066 wrote:
Hello,
I have an index on a very large table and I want to see how the applications running on this DB handles a situation in which this index does not exists.
2. the second option is Modify the index columns statistics (which I have done)
I'm still wondering if there is a way of modifying the statistics of the index in such a way so that it is not used by the optimizer.
Since the main contributors of the formula for an simple b-tree index access path are the height of index, the number of leaf blocks and for the table access the clustering factor, may be you could come up with all those values bumped up to very large values for that particular index.
Unfortunately the only component of the formula that is not multiplied by a factor is the height of the index, which is sanity checked (at least in 10.2) when set manually and is limited to a (already quite unreasonable) 255, so you can't set it greater than 255, but the remaining attributes can be set more or less to whatever you want.
So you could come up with an manual modification of the index statistics like this. Note that I don't modify the NUM_ROWS and DISTINCT_KEYS values in an attempt to limit the risk of unwanted side effects of this modification.
begin dbms_stats.set_index_stats(
ownname=>'<index_owner>,
indname=>'<index_name>',
indlevel=>255,
numlblks=>1000000000,
clstfct=>1000000000,
avglblk=>1000000000/<num_distinct>,
avgdblk=>1000000000);
end;
/In a quick test I was successfully able to prevent a very selective index access path using these settings, but depending on your remaining statistics and the access paths chosen by the optimizer this might not work for you, at least not in all possible cases, e.g. an index unique scan won't cost more than 256 even using these settings because only a single leaf block by definition has to be visited in this case.
Of course I haven't checked thoroughly what other side effects this statistics fudging does have, so use at your own risk resp. test it in your non-production environment before even thinking about applying it to an production system.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/

Similar Messages

  • How to force the Netscape browser to use Java Plug-in 1.3.0_02?

    For Analyzer 6.2.1, how to force the Netscape browser to use Java Plug-in 1.3.0_02?

    Change the classid in the object tag here is some info.This applies to JRE's 1.3.1 and greater.How do I know what Class ID to use for a specific JRE?CAFEEFAC-0013-0001-0004-ABCDEFFEDCBACAFEEFAC = This tells the browser to force a specific JRE0013-0001-0004 = JRE version number 1.3.1_04 (1.3.1_08 would be 0013-0001-0008)ABCDEFFEDCBA = Just needs to be there.1.3.0_02 = E19F9331-3110-11d4-991C-005004D3B3DB, it seems like they did not implement the standard until v.1.3.1Any good JRE Version = 8AD9C840-044E-11D1-B3E9-00805F499D93, this class id will just look for any good JRE.http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/version.html

  • How to force the "Bluetooth Communicat​ions Port" to be one of COM1 to COM8 ports?

    Dear Lenovo Community, Happy Holidays to you all and wish you a great happy new year. Recently purchased a Bluetooth OBDII device and have difficulty making it to work with its provided software on my T61 (running original XP Home). My short story and question/problem is that I can open "My Bluetooth Places" and pair with the OBDII device as an "OBDII SPP Dev", but my T61 assigns serial port COM19 to it. The OBDII software which came with the device only can let user set to one of the COM1 to COM8 ports and in the properties of Bluetooth pairing, there is no way that I can select which COM port to use. I looked at the Device Manager and I do see these COM port assignments: COM4,5,6,7: Sierra Wireless (the HSDA modem in the laptop which I have never used BTW) COM 9,10,11,12,13,14,15,16,17: Bluetooth Serial Port COM 18, 19: Bluetooth Communications Port and I don't see anything for COM1,2,3, and 8 My question is how to force the computer/OS to assign one of the COM1 to COM8 ports to my device upon pairing? Can I disable the Sierra Wireless model from the COM ports list and hope this will happen? Thanks for your help and inputs beforehand. Regards, AL

    Hi, AL_K
    Have you attempted to change the port number in device manager itself? If you navigate to Device Manager and open the list of Ports, you can right-click on the device you wish to assign a different port number. After right-clicking, click Properties. There should be a tab called Port Settings. In here, you should find a setting to manually assign a port number.
    Good luck, and let me know how it goes,
    Adam
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution!" This will help the rest of the community with similar issues identify the verified solution and benefit from it.

  • How to Force the Good Plan present in dba_hist_sql_plan for an SQL_ID

    Hi Folks
    Here i have a question on how to fix the query execution plan for which we are facing the problem. The current execution plan of the SQL ID is bad , but the execution plan in dba_hist_sql_plan or v$sql_plan is showing good one's.
    So how to force the plan_hash_value present in dba_hist_sql_plan or v$sql_plan to the current sql. Where in we cannot try using any kind of hints in the SQL so my question here , is there any way to update manually to update the plan_hash_value for the SQL_ID so that it can use the execution plan which we want to force.
    Regards,
    Phani.

    But my question is i have the good plan for the SQL_ID which is now running with the bad plan ( I am able to see the good plan in dba_hist_sql_plan view ) , my challenge here is how to force >the SQL_ID to take good plan PLAN_SQL_HASH_VALUE. Once the query is parsed and in memory I'm not aware of any way of changing the plan :(
    A day later a similar situation came up with one of our clients. I'm still not aware of any way to manually change the execution plan of an already parsed SQL but suspect histograms and/or bind peeking may be a way to explain this phenemenon
    Edited by: riedelme on Jun 18, 2010 6:13 AM

  • On a new imac how much of the HDD is already used with the OS,iLife,apps..

    Looking to buy my 1st ever iMac, the one Im going to get is the base one, with 250Gb HDD (I may upgrade to 320Gb for UK £29 though)
    My question is how much of the HDD is already used by OS X and everything on it? I understand there is some free trial stuff onthat can be installed eg MS Office, iWork etc I would want these removed as wouldnt want them so how much is left before you start adding your own stuff
    I also want to install Win XP on it so need to know what to do, 250Gb in todays computing is very stingy I think, so I need an idea
    cheers

    Here's are some disk usage information from my 20" white C2D. The numbers
    are running totals that include periodic software updates and some of my own
    stuff -- but that would be less than 0.5 GB of the final total.
    OS-X with "no optional packages" is a very usable system; it includes 'core'
    applications such as Safari, iTunes, Quicktime. It does not include any of the
    iLife apps or the iWork/MS_Office test-drive bloatwares.
    The large increase in disk usage for a minimum Leopard system is partly due
    to the inclusion of more apps in the 'core' OS package. Some things that were
    optional in Tiger have become part of the "minimum" Leopard install.
    The Xcode software development tools are a standard part of every OS-X
    distribution, but since most customers have no use for them, they're not
    included in the factory-installed disk image. If you don't plan to install
    them, subtract 3.4 GB from the final tally.
    Factory pre-installed Tiger 10.4.8 & bundled software .................. 16.4 GB
    Erase & Install Tiger 10.4.8 with NO optional packages .................. 2.9 GB
    SoftwareUpdate to 10.4.10, with NO optional packages .................. 3.1 GB
    Erase & Install Leopard 10.5.0 with NO optional packages ............... 6.6 GB
    SoftwareUpdate (11/11, immediately after Leopard install) ............. 6.7 GB
    Install Xcode SW development tools from Leopard DVD ................. 10.1 GB
    Install & SoftwareUpdate iLife'08 (except iWeb & GarageBand) ....... 12.3 GB
    SoftwareUpdate to Leopard 10.5.1.................................................. 12.5 GB
    IMO, 250 GB is FAR more than you'll ever need for installable software plus
    a sizeable collection of music/photos. OTOH, no amount of disk space will
    ever be enough for an avid music/photo/video junkie, and everyone should
    have an external backup drive. So, stick with the standard internal drive and
    buy more external storage.
    ...a billion here, a billion there -- and pretty soon you're talkin' 'bout alot of money,
    Looby

  • No question, I just wanna say thanks to the person who discovered how to change the correct dns to use FaceTime. The 8.8.8.8. Really work. Genius. Thanks again.

    No question, I just wanna say thanks to the person who discovered how to change the correct dns to use FaceTime. The 8.8.8.8. Really work. Genius. Thanks again.

    solved

  • I have an apple emac powerpc G4 which is running 10.3.9 software. I downloaded the 10.5 leopard software. Does anyone know how to install the 10.5 without using the dvd installer? In dummy terms please?

    If any one could help me with this. i'd be enternally grateful as i'm getting nowhere on my own!
    I have an apple emac powerpc G4 which is running 10.3.9 software. I downloaded the 10.5 leopard software. Does anyone know how to install the 10.5 without using the dvd installer? In dummy terms please

    The only way to get 10.5 is to purchase it on CD. Such as http://www.amazon.com/Mac-OS-Leopard-10-5-10-51/dp/B0012RAVRC where is being sold for $179.99.
    If your optical drive is broken, you will either need to replace it or get an external. There is no other way.
    Why do wish to upgrade? As you can see it is going to be expensive, probably more the Mac is worth.
    Allan

  • How to make the whole movie stop

    Hi,
    I want to make a button open a new scene,
    I have that working but it keeps looping,
    How to make the whole movie stop at the end of scene 2,
    Ive tried putting stop(); but that brings errors,
    I want to stop the whole movie, How would i do this?

    click an empty part of the stage in the frame where you want the timeline to stop and in the actions panel type:
    stop();

  • How to automate the data load process using data load file & task Scheduler

    Hi,
    I am doing Automated Process to load the data in Hyperion Planning application with the help of data_Load.bat file & Task Scheduler.
    I have created Data_Load.bat file but rest of the process i am unable complete.
    So could you help me , how to automate the data load process using Data_load.bat file & task Scheduler or what are the rest of the file is require to achieve this.
    Thanks

    To follow up on your question are you using the maxl scripts for the dataload?
    If so I have seen and issue within the batch (ex: load_data.bat) that if you do not have the full maxl script path with a batch when running it through event task scheduler the task will work but the log and/ or error file will not be created. Meaning the batch claims it ran from the task scheduler although it didn't do what you needed it to.
    If you are using maxl use this as the batch
    "essmsh C:\data\DataLoad.mxl" Or you can also use the full path for the maxl either way works. The only reason I would think that the maxl may then not work is if you do not have the batch updated to call on all the maxl PATH changes or if you need to update your environment variables to correct the essmsh command to work in a command prompt.

  • How to find the columns and tables used in a stored procedure?

    Hi,
    Can someone suggest how to find the columns and tables used within a stored procedure?
    Thanks
    VBK

    For example:
    SQL> create or replace
      2    procedure p1
      3      is
      4          cnt number;
      5      begin
      6          select count(*) into cnt from emp;
      7  end;
      8  /
    Procedure created.
    SQL> select  referenced_owner,
      2          referenced_name
      3    from  dba_dependencies
      4    where owner = 'SCOTT'
      5      and name = 'P1'
      6      and referenced_type = 'TABLE'
      7  /
    REFERENCED_OWNER               REFERENCED_NAME
    SCOTT                          EMP
    SQL> SY.

  • How to force the Netscape Browser to open the "Open or Save" dialog box?

    Hi, I tried to force the browser to open the "Open or Save" dailog box for downloading a file.
    response.setContentType(context.getMimeType(file.getName()));
    response.setHeader("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"");
    This works fine with IE for all file types( Even though he prompts twice to Open the file directly). but Netscape opens the file directly in the browser with showing any dialog box for text and html files. Anyone knows how to force the netscape in this case or for any file type? Any help will be appreciated.
    Thanks

    any one has the solution for this issue ? I tried the search and I didnt find any answer.
    when your trying to open a pdf file as attachment is seperate window, it works well in IE but in netscape it opens up in the same browser, it doesnt open a seperate window
    res.setContentType( "application/pdf" );
    res.setHeader("Content-Disposition","attachment; filename=\"" + cofcFileName+"\"");

  • How to print the Module pool screen using a push button in the screen

    Hi Every one,
                         i have developed a module program , which have a selection screen and it display the output in a structured way.
    output includes boxes, texts etc...
    my problem is :---
    How to print the Module pool screen using a push button in the screen.

    When the "Print" button is pressed:
    leave to list-processing and return to screen 100.  "(current screen)
    Call a transaction that runs your print program.
    Rob

  • How to access the SAP MDM destinations using mdm java api in 7.1

    hi,
    I have SAP MDM 7.1 SP11 and SAP Portal 7.3 and developing the custom webdynpro application using the  JAVA MDM API. I want configure the SAP MDM destinations in SAP Portal .
    How to access the MDM destinations in java code using API? and how to create the connection with MDM using the MDM destinations.
    Please provide the code for access the SAP MDM destinations in java code using MDM java api and creating the connection to MDM.
    Thanks

    Jun,
    Thanks for the reply and api information.
    I have got this api information from the following sap documentation. But i am looking for the code by implementing this class and creating the mdm connection.
    Creating an MDM Connection Using Java Code - SAP NetWeaver Master Data Management (MDM) - SAP Library
    if any thing can you share it.
    Thanks

  • How to run the oracle application cleint using static ip or domain please e

    How to run the oracle application cleint using static ip or domain please explain me.
    i am not able to run oracle forms in client machine how to run it please explain me
    Please give me detail regarding that
    any body please help me.
    my mail id::::: [email protected]

    You did not mention exactly which Forms version you are using so it will be difficult to offer specific help. However, you did mention Forms 9i. ALL "9i" releases were desupported long ago, so find software or documentation are becoming more difficult.
    Here is the Deployment Guide for Forms 10.1.2
    http://download.oracle.com/docs/cd/B19375_07/doc/frs/forms/B14032_03/toc.htm
    Here are some technical reference for Forms 9.0.x
    http://www.oracle.com/technology/products/forms/techlisting9i.html

  • How to set the full screen mode using setClip method

    hi all,
    how to set the full screen mode using setClip in that softkeys should not be used insteat on that need to create a own softkeys using commands.
    thanks & regards
    Bala.

    In CS5 there are changes made to how the screen mode is reported. In CS3-CS5 the screen mode has a corresponding number. So for instance if the ScreenMode is set to "Preview Off" and you ask indesign CS3 or CS4 to display the screen mode, it will report "1936552047", while in CS5 it will report "PREVIEW_OFF".
    try executing this simple command in respectively CS3, CS4 and CS5 and you will see what I am talking about:
    alert(app.activeWindow.screenMode);
    there is no difference if you do:
    alert(app.activeDocument.layoutWindows[0].screenMode);
    The CS5 solution is rather awkward to work with, unless I am missing something? PREVIEW_OFF is not a string, nor is it a number.
    Example -  doing:
    myScreenMode=app.activeDocument.layoutWindows[0].screenMode;
    and then trying to reset screenMode by something like:
    app.activeDocument.layoutWindows[0].screenMode= myScreenMode
    does not work in CS5 of course. It will throw an error. Neither will this line work:
    app.activeDocument.layoutWindows[0].screenMode=ScreenModeOptions.myScreenMode;
    Any way of working around this?

Maybe you are looking for