Query slows the system.

There is one query which is giving some problem in the production site:
SELECT ID, REGISTERED_USER_ID, BILL_TO_FIRST_NAME,ADDRESS,ORDER_STATUS,ORDER_SUBMISSION_DATE FROM ORDERS WHERE REGISTERED_USER_ID =@PO AND
ORDER_STATUS='COMPLETE' AND
ID IN( SELECT ORDER_ID FROM PACKAGE_HEADER WHERE PACKAGE_HEADER.ORDER_ID= ORDERS.ID)
ORDER BY ORDER_SUBMISSION_DATE DESC
I want to optimism this query. I guess using joins concept we can optimise it further.
Can any one please advice me on this.
Thanks.

Check if this okay for you.
SELECT A.ID,
       A.REGISTERED_USER_ID,
       A.BILL_TO_FIRST_NAME,
       A.ADDRESS,
       A.ORDER_STATUS,
       A.ORDER_SUBMISSION_DATE
FROM ORDERS A
    ,PACKAGE_HEADER B
WHERE A.REGISTERED_USER_ID = @PO
AND A.ORDER_STATUS = 'COMPLETE'
AND A.ID = B.ORDER_ID
ORDER BY ORDER_SUBMISSION_DATE DESCCheers
Sarma.

Similar Messages

  • Ios7 update has slowed the system... help !!!

    Hi all... I was eagerly waiting to get my hands on the latest apple offering ios7 for my ipad 2... however post upgrade the excitement seems to be fading away... the UI has totally changed- looks pretty new but i guess it has started to take more RAM space and has slowed the processing.. safari doesn't seem to be working effectively as well... i have also tried to free some space by deleting some apps.. i don't even keep multiple apps running and lastly also tried a reboot.. but still no luck... can anyone please assist ??  Is apple coming with an update to faster the systems....appreciate your assistance...

    Try closing all inactive apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe up on the screenshot of the app you want to exit.
    3. The app will fly off the screen

  • Teatimer periodically starts paging like crazy(1500+pfs). It slows the system down very noticiably. How do i stop if?

    It occurs several times a day and eventually stops. It often runs several minutes. I use the system task monitor to watch it. cpu usage is very small, in 3-5% range. I think the paging activity is overloading the paging subsytem for the rest of my tasks. If I stop teatimer, paging activity falls off markedly and everything else returns to normal response.

    I have the same problem and I cannot find any way to turn off the internal bluetooth without killing all bluetooth including the dongle. If someone has a way to turn off the internal bluetooth I want to see it.
    Thanks

  • XP Service Pack 3 successfull install & upgrade, but became slow the system...

    Hellow Guys i need your help. i try to install the services pack 3 on my Computer Windows XP service pack 2, because of required for skype after i install, the skype its working but i noticed that became slow if i open others browser like My Computer and
    if i type some word become slowmotion.. 
    i need your help guys!
    Thanks 

    Hi Toto Almario,
    Windows Forms Sample Applications is about "Discuss the Terrarium, TaskVision, FotoVision and IssueVision sample applications." If the problem is about Windows XP SP3, then you'd better consult some end-user forum. Such as
    http://answers.microsoft.com/en-us/windows
    However, maybe you need to uugrade your system, XP is out of support date http://www.microsoft.com/en-hk/windows/enterprise/end-of-support.aspx
    Regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • DVDRW is Mega-Slow and slows the system down

    Hi,
    I have:
    4 x SATA2 disks on the ICH7 (three in RAID 0, one as single disk)
    1 x IDE DVDRW on the Secondary IDE port, set as slave
    When I burned a DVD yesterday the sound started to slow, I thought it was the application. But when I try to install a game DVD, the same thing happens .. the sound becomes 'jittery' and most noticeably the DVD takes AGES (FOREVER) to read.
    I checked the BIOS, JMicron is set to IDE. the rest is set to defaults.
    I checked Device Manager, the only active channel (Secondary IDE) which was set to 'PIO ONLY'. I changed this to 'DMA if available' but it's still in PIO mode. I beleive it should be in DMA??
    Should I be using a different cable? I'm using the MSI supplied cable at present.
    Any assistance would be much appreciated!
     - FrobinRobin

    You already have the latest stable release from MSI, but unfortunately lots of MSI customers have a problem with this BIOS version. There is a Beta release (1.6a) that BOSSKILLER posted earlier
    http://www.ukshazam.com/download/bosskiller/7235v16A.rar
     and it’s upgrading the Jmicron BIOS version too. You can choose between DOS or Windows flashing procedure. If you decide in Windows mode, download the latest BIOS version from MSI Live Update (Application that came with your Installation CD for keeping your MB up to date) and the file from the link above. After everything downloaded, go to Program files-Setup files replace only the bios file (extension .150) with the one from the link above(extension .16A), and run the MSIsetup file. Make sure that the Clear CMOS option is selected. For safety reason, make a recovery floppy and check for some setting in BIOS before flashing, so that you can configure the new version of the BIOS properly.
    About the Widows drivers, Go to Control Panel – System- Hardware - Device Manager- “SCSI and RAID controllers” – right click on Jmicron- Uninstall.
    Then:  Control Panel- Add or Remove Programs – JRAID-uninstall.
    Restart your computer, and when you’ll be prompt that “Found New Hardware”, click cancel on the “Found New Hardware wizard” and install the drivers that I’ve posted earlier (double click on the setup file).
    Try with the drivers first, and if the installation is successful under DVD/CD Rom Devices you will notice that the drive is recognized as SCSI cD/Rom Device.
    Good Luck

  • How can I permanently remove plugin-container? It slows the system too much.

    plugin-container slows my computer down too much.
    I remove it using Task manager, but it keeps coming back.
    How can I permanently remove it short of changing to the Google Browser?

    See this support article. It tells you how you can disable Out of Process Plugins. <br />
    http://kb.mozillazine.org/Plugin-container_and_out-of-process_plugins#Disabling_crash_protection

  • HT1677 My iphone 4S's iOS-6 makes slow the system running.

    Hi,
    as above memtioned, after installing iOS-6, my iphone-4S is slow in running, such as can't open mail, camera and sometime stop.
    how can i slove it, do i need to restore the last version.

    There is no supported method to downgrade the iOS.
    Before leaping to silly conclusions... try basic troubleshooting from the User's Guide.
    Basic troubleshooting is reset, restart, restore (first from backup then as new).

  • Can a MacBook Pro battery spontaneously slow the system down?

    I sent my 2010 MacBook Pro to a non-Apple technician to replace the screen. He wrote me back stating that it was done but had a problem with the battery. He said that the computer takes 10 minutes to boot up and is slow afterwards. He said when he unplugs the battery it speeds up to normal. Before I sent it to him it had no such problems. Can a perfectly-working battery spontaneously go bad like this?

    Apple has financing arrangements you can use provided you have an adequate credit rating. You can apply when you make your purchasing arrangements online at the Apple Store. Or you can seek your own loan from a bank or charge the purchase on a credit card.
    Also, see Apple Credit Page.

  • Sql query slow in new redhat enviornment

    We just migrated to a new dev environment in Linux REDHAT5, and now the query is very slow, and I used the TOAD to run the query, it took like 700 msecond to finish, however from any server connection, the sql query takes hours to finish.
    I checked toad monitor, it said need to increase db_buffer_cache and shared pool too small.
    Also three red alert from toad is:
    1. Library Cache get hit ratio: Dynamic or unsharable sql
    2. Chained fetch ratio: PCT free too low for a table
    3. parse to execute ratio: HIgh parse to execute ratio.
    App team said it ran real quick in the old AIX system, however I ran it in old system, and monitored in the toad, it gave me all same 5 red alerts in old system, and it did provide query results a lot quicker though.
    Here is the parameters in the old system (11gr1 on AIX):
    SQL> show parameter target
    NAME TYPE VALUE
    -------------------------------- archive_lag_target integer 0
    db_flashback_retention_target integer 1440
    fast_start_io_target integer 0
    fast_start_mttr_target integer 0
    memory_max_target big integer 0
    memory_target big integer 0
    pga_aggregate_target big integer 278928K
    sga_target big integer 0
    SQL> show parameter shared
    NAME TYPE VALUE
    -------------------------------- hi_shared_memory_address integer 0
    max_shared_servers integer
    shared_memory_address integer 0
    shared_pool_reserved_size big integer 31876710
    shared_pool_size big integer 608M
    shared_server_sessions integer
    shared_servers integer 0
    SQL> show parameter db_buffer
    SQL> show parameter buffer
    NAME TYPE VALUE
    -------------------------------- buffer_pool_keep string
    buffer_pool_recycle string
    db_block_buffers integer 0
    log_buffer integer 2048000
    use_indirect_data_buffers boolean FALSE
    SQL>
    In new 11gr2 Linux REDHAT parameter:
    NAME TYPE VALUE
    ----------- archive_lag_target integer 0
    db_flashback_retention_target integer 1440
    fast_start_io_target integer 0
    fast_start_mttr_target integer 0
    memory_max_target big integer 2512M
    memory_target big integer 2512M
    parallel_servers_target integer 192
    pga_aggregate_target big integer 0
    sga_target big integer 1648M
    SQL> show parameter shared
    NAME TYPE VALUE
    ----------- hi_shared_memory_address integer 0
    max_shared_servers integer
    shared_memory_address integer 0
    shared_pool_reserved_size big integer 28M
    shared_pool_size big integer 0
    shared_server_sessions integer
    shared_servers integer 1
    SQL> show parameter buffer
    NAME TYPE VALUE
    ----------- buffer_pool_keep string
    buffer_pool_recycle string
    db_block_buffers integer 0
    log_buffer integer 18857984
    use_indirect_data_buffers boolean FALSE
    SQL>
    Please help. Thanks in advance.

    846422 wrote:
    why need ddl? we have a sql query slow.The DDL shows the physical structure of the table and physical storage characteristics. All relevant in performance tuning.
    As for the SQL query being slow. It is not.
    You have not provided any evidence that it is slow. And no, comparing performance with a totally different system is not a valid baseline for comparison. (most cars have 4 wheels, a gearbox and a steering wheel - but that does not mean you can compare different cars like a VW Beetle with a VW Porsche)
    What is slow? What are the biggest wait states for the SQL? What does the execution plan say?
    You have not defined a problem - you identified a symptom called "+query is slow+". You need to diagnose the condition by determining exactly what the SQL qeury is doing in the database. (and please, do not use TOAD and similar tools in an attempt to do this - do it properly instead)

  • I can't go beyond release 3.6 because it slows my system down to a crawl. When I back the upgrade out and go back to 3.6 my system is fine. Any suggestions?

    I can't go beyond release 3.6 because it slows my system down to a crawl. When I back the upgrade out and go back to 3.6 my system is fine. Any suggestions?

    Does that PC meet Firefox 4.0+ system requirements for hardware? <br />
    Firefox 4.0+ versions are considerably different from earlier versions. <br />
    http://www.mozilla.com/en-US/firefox/6.0/system-requirements/
    * Pentium 4 or newer processor that supports SSE2
    * 512MB of RAM
    * 200MB of hard drive space

  • I just installed Lion and the newest version of Logic express 9 (9.1.5) and every time i playback audio I get this error message:  [Disk is too slow or System Overload. (-10010) . Never had any issues before now...

    I just installed OSX Lion (10.7.2) and updated to the newest version of Logic express (9.1.5) on a macbook and every time I playback audio I get this error message:  [Disk is too slow or System Overload. (-10010) The Sudden Motion Sensor may have parked the hard drive head, or the disk performance is not sufficient to read or write all audio tracks, or the system was not able to process all data in time]
    Never had any issues before now... any ideas?

    Have a look into the Preferences folder (YourUserFolder/Libraries/Preferences/) and trash all Logic preferences.
    You'll have to setup the program again.
    cheers
    rob

  • "LOGIC PRO X: Disk is too slow or System Overload.  (-10010)"  This is the message that I was having since two weeks ago with my Logic 9.  I updated two days ago to Logic X and I am still having the same problem.

    "LOGIC PRO X: Disk is too slow or System Overload.  (-10010)"  This is the message that I was having since two weeks ago with my Logic 9.  I updated two days ago to Logic X and I am still having the same problem.
    I recently formatted my computer.  In other words, I'm not using too much memory of my HD.  My Memory Ram is 8GB.

    dandotcraig wrote:
    A week before logic X comes out it starts bugging out... i deleted a bunch of stuff on my HD and cleaned up everything... didnt fix anything... then logic x came out and I though oh i better update that will fix everything... and im still having the same problems... its rediculous.
    Umm,, no offence... but what is ridiculous...  is you didn't troubleshoot the original problem but instead you assumed it was a LP9 problem so you updated to LPX which is still in its early days and is likely to be less stable than LP9... rather than more so!
    So.. Here's the thing.... 
    LP9 was working fine and then stopped working normally according to you. Therefore what changed at the time LP9 stopped working normally?
    Here are just a few ideas to think about.. for around the time this started..
    Did you update Logic Pro 9... OS X... Drivers for Midi/Audio or other connected devices?
    If you did, did you then restore from a backup you made prior to these problems occuring and what happened when you did so? (assuming you do make backups of your system?)
    Did you install any new Apps on your Mac?
    Did you add a new Hard Drive? How is it formatted?
    Did you start recording or creating music in a different way to how you used to before the problem started?
    Have you started using a different SI or FX plugin or plugins.. More or different FX for example.. Did you install a new version of a plugin?
    Is all your software legal? (Have to ask because some people install all kinds of illegal plugins and whatever else.. and have no idea how the 'cracks' work or what they might affect/mess up/conflict with in the process)
    Have you looked at the System logs to see if anything is happening out of the ordinary when you get these messages?
    Have you looked at OS X's Activity monitor to see if any app or routine is kicking in hard when you get this issue?
    Basically, you need to think about and look for what changed... because something apparently changed to suddenly cause these issues...given you said you didn't have them until a certain timeframe and some of the questions above, I hope, will get you thinking..
    ....and maybe a few of the others here will come up with other ideas and suggestions to help you...
    Good luck and let us know how you got on...

  • After closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    after closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    You can always shut it down manually via the Task Manager
    (CtrlShiftEsc)...
    On Mon, Sep 1, 2014 at 3:05 PM, frank koethen <[email protected]>

  • Query For PO's that are open (no receipt yet in the system)

    Hi All,
    I want to frame a query for PO’s that are open i.e. no receipt yet in the system. Also PO’s must be for Inventory Items.
    Can anyone please help me with this.
    Regards,
    Shruti

    Look at those records in po_lines_all where item_id is not null. And then look at the quantity and quantity_received fields.
    Hope this helps,
    Sandeep Gandhi

  • Table which has info about all "Query views" in the system

    hi all,
    which is the table that stores information about all the "Query views" present in the system?
    i searched in tables RSRREPDIR and RSZELTDIR, but i could not find any query view that is already present in the system.
    regards,
    Rk

    To know execution time, execute the query and then analyze the table RSDDSTAT using t-code se16..
    i think u need to check the value of  QTIMEOLAP var in the table for getting query execution time..
    more info please refer the note 130696
    U can execute query in RSRT also after setting options for Statistics

Maybe you are looking for