How to reduce the cost for this select script

Hi,
"select id from order where cmd like 'Error ID %'"
This s my script. And the order table has morethan *5lakhs* records, when i select id for the above condition, my sql script cost is - *2200*,and cpu_cost is -- *235660697* i got this above information thro' plan_table, could anyone plz give suggestion to reduce the cost. (fyi -- cmd field has index with not null constraint).
Thanks.

user13294228 wrote:
"select id from order where cmd like 'Error ID %'"
This s my script. And the order table has morethan *5lakhs* records, when i select id for the above condition, my sql script cost is - *2200*,and cpu_cost is -- *235660697* i got this above information thro' plan_table, could anyone plz give suggestion to reduce the cost. (fyi -- cmd field has index with not null constraint).What does these cost numbers mean? Do you know what it means and what measurement unit is used for these costs? Will a cost of 2000 be fine? 1500? What specific number will make you sit back and think that the cost is now acceptable?
Or instead, do you not think it is more important to rather look at what the query does and why.. and then determine if there are methods to do that better and faster?
So let's look at what the query does. It uses a a LIKE predicate. This means that if an index is available, it cannot be used to find a specific indexed value... as the query is not sure what the value is. All that the query knows is what the first couple of characters are for the value.
So how would an index be used? Have you looked at the execution plan? Do you understand why the CBO made the decision it did?
Now - how do you expect the CBO to find the relevant rows any faster? The index benefits the query how? As the CBO cannot put the index to any better use than what it is already doing, what other options are there? Can alternative indexing or data structures be considered? Can parallel processing be used?
These questions are intended to make you analyse the problem - and understand the problem. That is always the 1st step.. solving the problem only comes after this 1st step.

Similar Messages

  • How much is the cost for replacing iphone 4 display?

    how much is the cost for replacing iphone 4 display?

    Apple will replace it, and the replacement comes with a 90-day warranty.
    There are some legitimate, high quality repair centers that often can fix phones for less than replacement cost and offer at least 90 warranty...
    Or maybe the OP knows that the broken display is not covered under warranty, which is why he was asking for the cost, but he still may have a warranty that just wouldn't cover him in this case.
    The warranty is all or none.  If the phone were damaged so as to void warranty coverage on the display, there is no remaining warranty on the rest of the device.

  • HT4623 i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS

    i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS

    look at this thread
    https://discussions.apple.com/message/22837309#22837309

  • How to reduce the cost of procedure?

    hi,
    Suppose i have a procedure of more than 1000 lines,during normal processing it takes few seconds.So, how can one reduce the processing for the same.
    Thanx ,
    Piyush

    DBMS_PROFILER is one way to analyse where the time is being spent. You can use this from the command line, or many GUI tools such as PL/SQL Developer provide a convenient interface.
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/tuning.htm
    http://www.dbasupport.com/oracle/ora10g/Unleashing-DBMS_Profiler.shtml
    http://www.allroundautomations.com/plsprofiler.html

  • How to reduce the time for each clips up to 0,04 seconds?

    Hi, I'm trying to realize my first time laps. I've need to reduce the time for each clips up to 0,04 seconds, but it seems that the minimum time is 0,1 second. There's a solution?

    And use a zip file.  Many people can't open RARs.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to get the children for a selected tree node?

    Hi,
    I want to get the number of child nodes for any selected node in JTree.
    How can i do this?
    Any help, greatly appreciated!!

    if you have a node already where aNode is a DefaultMutableTreeNode for example, then you can use that object's API method to get the child count.
    int childCount = aNode.getChildCount();
    If you want to loop through all of a node's children and do something at each node, the following may help:
    java.util.Enumeration e = aNode.children();
    while ( e.hasMoreElements() ) {
    DefaultMutableTreeNode n = (DefaultMutableTreeNode)e.nextElement();
    //Do something with n
    Hope this helps,
    Claire

  • How to correct the sql for this

    Here is my requirement
    How to find the master apps for this.
    If there is rollup info for a app then it is parent
    Rollup info is present in table B with flag R
    Table A
    AppNo Name
    1 abc
    2 xyz
    3 pqr
    4 mno
    5 stu
    6 ccc
    7 ddd
    Table B
    srce dpnt flag
    1 1 R
    2 6 R
    2 7 R
    3 4 R
    So now the parent apps are 1,2,3 since they have children (1,6,7,4)
    Now i want 5 to be included in the parent list as it is an independent app
    Appno name
    1 abc
    2 xyz
    3 pqr
    5 stu
    my query is not including appno
    appno name
    5 stu
    select * from TableA a
    where a.appno in (
    select distinct SRCE from TableB where b.SRCE=a.appno
    and b.flag='R' )

    one solution:
    select srce from table_b
    union
    select appno from table_a
    minus
    select dpnt from table_b
    )

  • How to meet the requirment for this infospoke

    Hi Experts
      Please update me on how to proceed to meet this requirment.
      I am building a Infospoke on a Cube to export data to Application Server.
      In my Cube i had a CHAR Department.
    Department got a time Dependent Navigational Attribute 'MANAGER'
    My requirment is...
       In my infospoke I had a field included Manager....
    This should be populated during run time by reading Time Dependent Master Data Table based on Employee and Current date..it should get Manager
    Please update wether Routine is the only way or any alternatives for this requirment...that i can set in Transformations
    Thanks

    Found it...
    http://help.sap.com/SAPHELP_ERP2004/helpdata/EN/49/7e960481916448b20134d471d36a6b/content.htm
    Regards
    Juan

  • How much is the cost for apple to change ipad 3 digitizer screen glass?

    hi, i like to know how much apple will charge me to change the ipad 3 wifi+data digitizer screen glass for a new one?

    Apple does not repair iPads, but will replace the entire iPad for a flat fee; see the Repair Pricing section here:
    http://www.apple.com/support/ipad/service/faq/
    There are independent iPad repair services that may be able to replace the screen for less. Do a web search for "ipad repair".  Note, though, that if you elect to have the iPad serviced by an unauthorized shop, all further warranty will be void.
    Regards.

  • How much is the cost for iPhone 4S screen replacement

    My one & only very favourite iPhone 4S  was dropped unfortunately that's why it's screen is cracked but all other options are working as it was before even including any kind of touch options I mean  everywhere on screen also working as well like new:So please let me know  how much the cost will be to repair it.

    About £60, but the other option is to buy a screen from a popular internet based auction site, and fit it yourself using a video from a site such as You Tube.

  • How can i reduce the cost of this explain plan

    Plan
    SELECT STATEMENT  ALL_ROWSCost: 180,804  Bytes: 984,239,144  Cardinality:
    Edited by: user565033 on Dec 11, 2008 8:05 AM
    Edited by: user565033 on Dec 11, 2008 8:06 AM
    Edited by: user565033 on Dec 12, 2008 1:22 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    user565033 wrote:
    2. i am trying to use this query to create a materialized view. My problem is this query returns in under 5mins. But when i try to create the view ( or even a regular table), it goes in a long-op ( sort ouput) whoes time itself is over 4-5 hrs.If it takes 5 min. to return the first rows, but hours to process the complete result set, this suggests that the problem is very likely caused by the function calls, since the sort of the result set must have already been performed to return the first rows and the function calls will probably be performed using the final result set. Try to perform the same without any function calls and check if you can build then a table more quickly.
    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/

  • How much is the cost for a cracked I pad screen

    I Cracked my I pad air.

    Apple's Limited Warranty http://www.apple.com/legal/warranty/ for iPad excludes coverage for damage resulting from accident, disassembly, unauthorized service and unauthorized modifications.
    Generally, the warranty will apply to the country of purchase. And if there is a problem needing repair you have to return it to the country of purchase.
    Apple’s Limited warranty can be found here:
    http://store.apple.com/Catalog/Images/worldwidewarranty.html
    http://images.apple.com/legal/warranty/docs/ipad_warranty.pdf
    Out-of-Warranty Service
         If you own an iPad that is ineligible for warranty service but is eligible for Out-of-Warranty (OOW) Service, Apple will replace (Apple doesn't repair) your iPad with an iPad that is new or equivalent to new in both performance and reliability for the Out-of-Warranty Service fee listed below. (The replacement will most likely be a refurbished iPad in a brown box, however, it has a new screen, back and battery.)   
    iPad model
    Out-of-Warranty Service Fee
    iPad mini
    $219
    iPad 3rd, 4th, Air
    $299
    iPad 2, iPad
    $249
    A $6.95 shipping fee will be added if service is arranged through Apple and requires shipping. All fees are in US dollars and are subject to local tax.
    Certain damage is ineligible for out-of-warranty service, including catastrophic damage, such as the device separating into multiple pieces, and inoperability caused by unauthorized modifications. However, an iPad that has failed due to contact with liquid may be eligible for out-of-warranty service. See http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipad
    iPad Repair and Service
    http://www.apple.com/support/ipad/repair/
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
    You may can get the iPad repaired at 3rd party repair sources for less $, however, any remaining Apple warranty will be voided.
    iCracked - Broken iPhone, iPod or iPad
    http://www.icracked.com/
    iReVamp Electronics Screen Repair ($99)
    http://www.irevampelectronics.com/ipad-2-broken-glass-screen-repair.html
    iPad Repair & Screen Replacement Services
    http://www.ifixyouri.com/16-ipad-repairs
    RepairZoom iPad Repair
    http://www.repairzoom.com/ipad-repair.html
    Mission Repair
    http://www.missionrepair.com/Apple_iPad_Repair_Services_s/431.htm
    iGadgetResQ
    http://www.igadgetresq.com/ipad-repair/
    Do It Yourself iPad Repair
    http://www.ifixit.com/Device/iPad
     Cheers, Tom

  • Plz provide the soln for this java script error

    am trying to access hotmail site but am getting the msg that JavaScript required to sign in how can this be done

    In your server.properties file there is a setting that controls the maximum number of connections that are allowed. It sounds like this number has been exceeded. Now I am not a server or database wizard so I have no idea why this is so. I've certainly not come across this scenario. Could it be that the connections are not being released when they are finished with? You'd probably need to speak to your IT or Server peeps to check this out. If all else fails the vale of your connections limit could be increased, but I don't know what implications this could have.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • How to create the request for change of selection text into other language.

    Hi,
    In my object requirement is that when login through Japanese language,  then on selection screen selection text should appear in Japanese language. For that I have maintained the text in Japanese language the program where we define the selection text there from translation I have maintained the text in Japanese but while maintain the text it didn't ask me for REQUEST, because of that I am not able to transport the changes to next system, so I want know how to create the request for this case.
    Thanks

    Hello Chetan,
    You could goto the selection screen texts by goto-> selection texts,
    Then you could again goto -> Translation
    or
    Other-> Translation(Not sure )
    Then double click on the Program you should be able to see the Texts that need translation, now change something save and come back and try to activate, now it should propose for a new Transport Request.
    Either create a new transaport request or give one that you have given for the program.
    Hope the issue is resolved.

  • How to write  complex sql for this

    Hi ALL,
    I have a requirement like this
    I have 5 tables which i have to join to get the result
    but there no join column to 2 other table.
    I want to get all the applications using cobal,running on UNIX.
    How to write the query for this
    1.APP
    APP_i DESC
    1 Accounts
    2 Payments
    3 order transfer
    4 Order processing
    2.Techgy
    techid techdesc
    1 cobal
    2 Java
    3.APP_Techgy
    APP_I Techid
    1 1
    2 1
    3 1
    4 2
    4.Pltfrm
    pltfmid pltfrmdesc
    1 Windows NT
    2 UNIX
    5.APP_Pltfrm
    APP_I pltfrmid
    1 1
    2 1
    3 2
    4 2
    ouput must be
    APP_i Desc techDESC pltfrmdesc
    3 ordertranfer Cobal UNIX
    Thanks in advance

    This ('descr' in place of 'desc')?
    SQL> select a.app_i, a.descr, t.techdesc, p.pltfrmdesc
    from app_techgy atc,
       app a,
       techgy t,
       app_pltfrm ap,
       pltfrm p
    where atc.techid = t.techid
    and atc.app_i = a.app_i
    and atc.app_i = ap.app_i
    and ap.pltfrmid = p.pltfmid
    order by a.app_i
         APP_I DESCR                TECHDESC             PLTFRMDESC         
             1 accounts             cobal                windows nt         
             2 payments             cobal                windows nt         
             3 order transfer       cobal                unix               
             4 order processing     java                 unix               
    4 rows selected.

Maybe you are looking for