Query cost is low but the time taken is high

Hi,
I have tuned the queries which now are costing the CPU low.  But the time taken is still higher (of order of 999,999,999.0)
What is scope of improvement ?
Regards,
Chitwanjit

Moderator message - Please ask a specific question - post locked
Rob

Similar Messages

  • Less sql query cost ... but more time to fetch the records...

    Hi,
    I faced up to a 'peculiar' situation with a costly db view.
    I attempted to reduce the total view cost
    specifically for 223 records fetched{the cost from 149 reduced to 74,
                                                           the recursive calls from 796 reduced to 224,
                                                           the consistent gets from 311516 reduced to 310341,
                                                            the physical reads from 7 reduced to 0}
    but the amount of time needed to fetch the results is greater than the old version of the db view....{it may be the double...}
    Have you any idea about this...????
    Note: I have got fresh statistics...
             I use db 10g v.2
    Thanks,
    Sim

    Try tracing the query and see what tkprofs shows you.
    alter session set events '10046 trace name context forever, level 12';
    run the query
    alter session set events '10046 trace name context off';
    Then run tkprofs on the trace file produced to see where the database is spending its time/effort. Do likewise for the baseline query in a different session (so you will generate a different trace file).
    If that does not produce anything useful, try using
    alter session set events '10053 trace name context forever';
    run the query
    alter session set events '10053 trace name context off';
    Then examine the trace file to see if you can learn anything.
    Since you have not given us anything more to go on, that is about all the help I can give....

  • Need  the query to calculate the time taken to excute it.

    hi all,
    i need the query to calculate the time taken to excute it.
    for ex:
    select * from emp;
    how much time it will take to give o/p
    Thanks in advance
    satya

    Just to add to what was said - the execution can each time be DIFFERENT as the factors that governs performance are NOT CONSTANT.
    If Oracle has no idea how long the query is going to take before executing it, then how can you and your code know?
    Oracle's CBO estimates the cost (expense) of the query. This is an indication of how expensive a query is - and the more expensive the query, the more resources need to be used, the longer the query will take. The less expensive the query, the fewer resources it need, the faster it will take.
    And that is it. How fast or how slow? Oracle does not know. How much faster a query with a cost of 10,000 versus a query with a cost of 1? Oracle does not know.
    Why? Because the platform is not constant. Just what data is at this exact moment in the db buffer cache? Just how much CPU capacity is available for the new few seconds? Just what will the sustained throughput be of the I/O subsystem and channels for the next minute? Just how many memory pages need to be swapped between cache and memory? Etc. etc.
    All these factors change every single second. So forget about attempting to accurately calculate up-front the time it will take for a query. IT IS NOT POSSIBLE.

  • How to analyse the time taken for a query

    Hey gurus ,
                          How to find the time taken for a query to execute .
    Regards,
    Venkatesh

    Hi,
    Time taken to execute a query = FRONT END TIME + OLAP TIME + DB TIME.
    front end time is time taken to do format in BEX.
    olap time is time taken to aggegate data in OLAP buffer.
    db time is tme taken to collect data at data target.
    to fine all these information
    goto RSRT -> give query name -> execute+debug -> it will display all the fields > check fields what ever u want.
    Regards,
    Haritha.

  • How to find the time taken for creating execution plan alone

    Hi,
    Is there any way to find out the division between the time taken for query parsing, creating execution plan and actual data retrieval seperately? If I enable 'set timing on' I see the elapsed time which is the total time taken for all these 3.
    Some of my queries are taking long time when I run it first time and so want to know what is it taking long, is it the parsing the query or creating the execution plan? (Since my queries run faster second time, I am assuming the major part was for parsing or creating the plan but not the data retrieval).
    Also, where does Oracle keep the execution plan? Is it in the BUFFER_CACHE? if so, I tried flushing the buffer_cache and restarting the DB as well, but still the query execution seems faster compared to the first time. How long does Oracle keep the execution plan in the cache and is there anyway to increase this cache size?
    Thanks in advance!

    user13169027 wrote:
    Hi,
    Is there any way to find out the division between the time taken for query parsing, creating execution plan and actual data retrieval seperately? If I enable 'set timing on' I see the elapsed time which is the total time taken for all these 3.
    Some of my queries are taking long time when I run it first time and so want to know what is it taking long, is it the parsing the query or creating the execution plan? (Since my queries run faster second time, I am assuming the major part was for parsing or creating the plan but not the data retrieval).
    The ideal way for finding the answer to your questions above, would be to perform a (sql) trace of your query executions. To see the difference in the trace-files, you might want to trace the first execution in one session, and the second execution in another session: so you get two different trace files, which you can then seperately tkprof, and investigate.
    Also, where does Oracle keep the execution plan? Is it in the BUFFER_CACHE? if so, I tried flushing the buffer_cache and restarting the DB as well, but still the query execution seems faster compared to the first time. How long does Oracle keep the execution plan in the cache and is there anyway to increase this cache size?
    Execution plans are held in the shared-pool, not the buffer-cache. As far as I know they will be kept in memory in an LRU way (least recently used), just like db-blocks are in the buffer-pool (I know this is not entirely correct, but for all practical purposes, think of it this way).

  • PO Lead Time cannot capture the time taken for shipping!

    Dear All
    I understand that we have PO lead time = PO Processing Time (Working Day) + Planned Delivery Time (Calendar Day) + GR processing time (working day).
    And this PO lead time will be added on top of my PO Creation Date to defer the actual goods availability date.
    My question:
    1. Planned delivery time is the time taken from vendor place to send out the goods to my warehouse. What if it is overseas purchase where goods leaving vendor's Port will first arrive in my country custom, and it will take 3 days to do clearance. once it is cleared, forwarding agent will delivery goods from my country custom to my warehouse. In this case, how do I capture it in SAP system for the planned delivery time as it has 4 periods of time now
    a. Time taken from vendor's port to reach my country's port
    b. Time taken for my country custom to do clearing
    c. Time taken for forwarding agent to fetch goods from custom to my warehouse
    d. Time taken for unpack, take out , count, inspect and put for use (GR processing time)
    Do I need to use user Exit?
    Thanks
    Edited by: Daimos on Apr 27, 2009 6:52 PM

    Dear dogboy.
    I think we must use feature on the PO Confirmation Control (CC) Key at PO Item Level:
    ED - Estimated Time of Departure from Overseas Port.
    EA - Actual Time of Departure from Overseas Port.
    EA - Estimated Time of Arrival
    AA - Actual Time of Arrival
    And the purchaser will maintain the value of each of the CC Key each time they are notified by the vendor.
    And we need to come out with a Customised Report to capture those CC dates entered so that finance is able to prepare $ in advance if the moment the EA is maintained, meaning the estimated date of arrival at the Custom there.
    But the problem is that PO User Exit is only at the header of Confirmation Control Key but not capture the DATE field we entered for each CC.
    That was the problem I last encountered.

  • OWB 10g - The time taken for data load is too high

    I am loading data on the test datawarehouse server. The time taken for loading data is very high. The size of data is around 7 GB (size of flat files on the OS).
    The time it takes to load the same amount of data on the production server from the staging area to the presentation area(datawarehouse) is close to 8 hours maximum.
    But, in the test environment the time taken to execute one mapping (containing 300,000 records)is itself 8 hours.
    The version of Oracle database on both the test and production servers is the same i.e., Oracle 9i.
    The configuration of the production server is : 4 Pentium III processors (2.7 GHz each), 2 GB RAM, Windows 2000 Advanced Server, 8 kilobyte primary memory cache, 512 kilobyte secondary memory cache, 440.05 Gigabytes Usable Hard Drive Capacity, 73.06 Gigabytes Hard Drive Free Space
    The configuration of the test server is : 4 Pentium III processors (2.4 GHz each), 1 GB RAM, Windows 2000 Advanced Server, 8 kilobyte primary memory cache,
    512 kilobyte secondary memory cache, 144.96 Gigabytes Usable Hard Drive Capacity, 5.22 Gigabytes Hard Drive Free Space.
    Can you guys please help me to detect the the possible causes of such erratic behaviour of the OWB 10g Tool.
    Thanks & Best Regards,
    Harshad Borgaonkar
    PwC

    Hello Harshad,
    2 GB of RAM doesn't seem to be very much to me. I guess your bottleneck is I/O. You've got to investigate this (keep an eye on long running processes). You didn't say very much about your target database design. Do you have a lot of indexes on the target tables and if so have you tried to drop them before loading? Do your OWB mappings require a lot of lookups (then apropriate indexes on the lookup table are very useful)? Do you use external tables? Are you talking about loading dimension or fact tables or both? You've got to supply some more information so that we can help you better.
    Regards,
    Jörg

  • All my downloaded(digital copy) movies will no longer play in itunes, i get a black screen, and no sound, but the time keeps going. how can i fix this?

    All my downloaded (digital copies from dvds) won't play in itunes. I get a black screen and no sound, but the time keeps moving. How do i fix this?

    Hi 22chill,
    I recommend that we delete and re-download the movie from your purchase history:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/HT2519
    Thanks,
    Matt M.

  • I bought a new iMac today. I'm using migration assistant to move all my software, but the time just keeps getting longer. It says connect an Ethernet cable for faster data transfer. I did, but that doesn't seem to help. Any ideas?

    I bought a new iMac today. I'm using migration assistant to move all my software, but the time just keeps getting longer. It says connect an Ethernet cable for faster data transfer. I did, but that doesn't seem to help. Any ideas?

    m1doc,
    Are you migrating from a Mac or a MS Window machine? Either way you probably should be in touch with AppleCare, you have 90 days of free AppleCare telephone support. They can usually help on issues like this. If you don't know the phone number please use http://support.apple.com/kb/HE57 to help find the number in your country.

  • I just upgraded from my 2008 MacBook to a new Macbook Pro. How do I get my time capsule to work on my new MacBook? I did data migration, but the time capsule did not pick it up. Any ideas?

    I just upgraded from my 2008 MacBook to a new Macbook Pro. How do I get my time capsule to work on my new MacBook? I did data migration, but the time capsule did not pick it up. Any ideas?

    If you migrated all the info from time machine to your new MBP. The TM will usually ask to connect to the old backups.. sorry I am not sure is this what you want to do.. Personally I think you start a fresh backup.
    BTW Time Capsule does not do anything.. it is a dumb hard disk in a box.. it is TM that does everything.
    Look at B5 and B6 here about connecting to your backup.
    http://pondini.org/TM/Troubleshooting.html

  • I delete an individual message but the time I received the message is still showing next to the persons name in my inbox instead of going back into the correct date/time order. Anyone know how to fix this?

    I delete an individual message but the time I received the message is still showing next to the persons name in my inbox instead of going back into the correct date/time order. Anyone know how to fix this?

    SOLUTION
    Open "terminal" on your mac and type the following:
    defaults write com.apple.mail IgnoreSortOrderWhenSelectingAfterDelete 1
    (copy and past the whole line)
    This will stop that behaviour in mail. 
    It works on most opperating systems.
    mine is.
    Mac OSx 10.7.2 Lion
    Cheers

  • When I locate my iPad it sends me my email but the time it says in the email is like a 3 hour difference from the actual time I locate what do I do to have the proper time there

    When I locate my iPad it sends me my email but the time it says in the email is like a 3 hour difference from the actual time I locate what do I do to have the proper time there
    My time is correct but email time of location is wrong

    Welcome to the Apple community TMOZINGO.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact AppleCare(or Apple ID Support), upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • How do I reset the time in my email.the computer has the right time but the time stamp is three hours earlier. If I go to my ISP website, the time is correct

    I was locked out of my ISP mail for a few hours. When it was restored, the time stamp on the email through their website was correct, but the time stamp in Apple mail is 3hr earlier. The clock on ther computer is fine just the time stamp in apple mailis off.
    Thanks

    I'm the OP and just read https://discussions.apple.com/thread/5817181 which attempts to outline the error in mavericks with regards to ntpd and pacemaker. I think just replacing the -302.642 with 0.00002 will keep me closer to the mark and I'll anxiously await the real fix as well--in 10.9.2 [hope x3] unless of course someone really knows how to fix this.

  • HT5012 My iPad was updated yesterday, but the time is wrong on the wallpaper, how do I change it?

    My iPad was updated, but the time on the screen is wrong. How do I correct it?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
     Cheers, Tom

  • I haven't used my iPod in a few months.  Gave it full charge, music showing on screen and in iTunes.  But when I push play, it says "Now Playing", but the time isn't moving forward and nothing is playing.  I have already reset it and that didn't help.

    I've had this iPod Classic for a couple of years, and only use it every so often, mostly when I travel.  Just bought a speaker so I can listen in the house.  Gave it a full charge.  The music is showing up on the screen, and it also shows up in iTunes on my computer.  When I try to play something, whether it's a song, artist, album, whatever, the screen shows the name of the song and displays "Now Playing".  The time stays on 0.00, however and doesn't move forward;  and no sound is coming out whether on the new docking speaker or with a headset.  I tried the reset procedure, but still no change.  Can anyone help me?  Thanks!!!

    A 4th gen iPod can not be upgraded to iOS 8. 7.0.2 is the high version it can run.

Maybe you are looking for

  • Photoshop CS6 is not responding when leaving PS and coming back again

    A weired problem: My new installation of Photoshop CS6 (OS X Mavericks on a new MBP) is not responding when leaving PS and coming back again. Example: i open a new file in PS - then i click on the desktop - when i go back to PS again, it is not respo

  • Vat return

    Dear sir, I need the vat retirn filling  so please send the process and where to finding the report of avt so i fill the vat report

  • Weblogic startup class: problem calling EJB's

    Has anyone ever experienced a problem in using a startup class (registered in weblogic.properties) and tried to lookup and use an EJB in the same application? Basically, I have a startup class which registers to receive messages from an MQ queue, and

  • Brush Lag? - Here are OpenGL settings that improve performance

    For anyone having horrible Brush lag, please try the following settings and report your findings in this thread. After much configuring and comparing CS4 vs CS3, I found that these settings do improve CS4's brush lag significantly. CS3 is still faste

  • The page will go to main.jsp even user don't input username?

    Hi everyone: I write a registe jsp page. If the user don't input name the error message will output and go to the registe page.But the jsp page go to main.jsp even I don't input username. My code is: /////////////////////////////////////RegisteAction