View in subquery too slow

Hi!
On Oracle 11.2
SELECT a.*
FROM APPLES a
LEFT OUTER JOIN PROPERTIES p on a.id=p.apple_id
WHERE
a.type = '1'
AND 0< (SELECT count(*) FROM view_1 v WHERE v.foo=123 AND v.color = p.color)This is 3 or more times slower (0.20 versus 0.60 seconds in one test) on our system than this:
DELETE from table_1;
INSERT INTO table_1 SELECT * FROM view_1 v WHERE v.foo=123;
SELECT a.*
FROM APPLES a
LEFT OUTER JOIN PROPERTIES p on a.id=p.apple_id
WHERE
a.type = '1'
AND 0< (SELECT count(*) FROM table_1 v WHERE v.foo=123 AND v.color = p.color)Is there a way to speed up the view?
It seems a temporary table would help. Is there some hint for Oracle to use it? Without changing each query?
The view_1 is a join over 4 tables and 3 more views (which are a CONNECT BY over a single table).
I thought about materialized views, but they either:
- slow down commits (ON COMMIT refresh)
- or are not up to date (scheduled refresh)
Regards,
David

I would move the properties table into the subquery. And of cause you MUST use exists instead of the slow count.
example
SELECT a.*
FROM APPLES a
WHERE a.type = '1'
AND EXISTS (SELECT null
                     FROM PROPERTIES p
                     join view_1 v on v.color = p.color)
                     where a.id=p.apple_id
                     and v.foo=123)
;THis query is not identical to the original. It would return only ONE row if you have multiple properties for the same apple.
Your query would return one identical apple row for each property.
However I guess since you don't even show the different properties, this is really what you want.
Edited by: Sven W. on Aug 4, 2011 6:47 PM

Similar Messages

  • HP Laserjet M1132 MFP is too slow over the network!

    Hi,
    My HP Laserjet M1132 MFP is too slow over the network!
    I have connect the printer to a windows XP 32bit SP3 using UBS port. The printer works fine on the local computer but when sharing it over the network it works too slow, for example with print test page it takes about 45 seconds to print and for other documents it takes much longer time.
    I have installed the latest driver form HP website and upgrade the firmware it the latest version.
    It happens on other Windows XP machines as well.
    I connected the printer to my laptop (Windows 7 64bit) and it works fine (No delays over the network) and it seems that this problem have some relations with the windows XP Driver.
    I have used local port trick on remote machines (instead of regular method) like this:
    ''add a local printer;
    'new port'
    'localport'
    \\XPcomputer\HPPrinterName as port name
    but still nothing!
    There is nothing wrong with the network, we use to use a Samsung printer on the same machines over the network with no problem.
    I Really appreciate your HELP!
    This question was solved.
    View Solution.

    BEHZAD_T, how is the printer connected to the network (wireless or Ethernet)? If it is slow wirelessly, I would suggest trying to connect the printer to your router with the Ethernet cord and install it to the networked computer that way.
    Another question is, relatively speaking, how close to your router are the Samsung printer and the HP printer? Depending on the distance (and what stands between the devices) there can be a lag between sending a print job and it being received by the printer.
    Let me know!

  • How can I get a better driver for my 1394b Hostcontroller in my Macbook pro 2010 to solve the problem, that it is too slow under Windows 7 installed with bootcamp ?

    How can I get a better driver for my 1394b Hostcontroller in my Macbook pro 2010 to solve the problem, that it is too slow under Windows 7 installed with bootcamp ?
    WIndows can't find a better one than the installed LSI Conformed 1394 Hostcontroller

    Read and follow the Bootcamp Installation instructions that you were offered to view when you ran Bootcamp Assistant.
    Run Bootcamp Assistant again and select the option to download the Bootcamp Support software. Follow the instructions. Then boot into Windows and install the Windows Support software you downloaded and saved.

  • Solution Manager too Slow

    Dear All,
    We are running SAP Solution Manager 7.01 on Oracle 11g in AIX.
    This central Solution Manager system is connected to more than 150 satellite systems.
    The response of the system is too slow while we take transactions like solman_workcenter, RZ20 etc.
    Is this because the system needs to fetch/collect infromation from all these 150 satellites before preseting the screen.
    Solman is running with 10 CPU, 50 GB RAM and 82 GB swap.
    The portal pages in the transactions takes more time to load.
    Could you please help me to pin point the bottle neck in the system.
    Regards,
    Kiran

    Hi,
    Basically with 150 systems you may experience network capacity issue.
    It does not matter if the system is the Solution Manager or any other SAP system. The analysis start from inspecting the overall time distribution by using the /nSTAD, then depending on the outcome check persistency, remote communication and locking with ST05 .
    If in STAD there are huge wait times then definitely the network capacity should be inspected with OS-level monitoring tools, same for the CPU, memory and disk.
    Regarding the java side views, it is very important to inspect the java side performance using the JDSR statistics in NetWeaver Web Administrator. There you would see the java side resource consumption to localize a potential memory consumption or CPU related issue. It is very important to clarify if the bottleneck is not the Garbage collection in java - if that is the case, the heap size parameters need to be tuned.
    Best Regards,
    Sylvia

  • "Full Screen Mode" in Adobe Reader XI for Windows 8 loads way too slow!

    I recently got a new laptop with Windows 8, after having used Windows Vista for years.  I installed Adobe Reader XI for my new computer.  Before, I used Adobe Reader X on Vista.  I used Adobe Reader "Full Screen Mode" to read the nice-looking Bible chapters I created with internet audio from Biblegateway.com.  In Vista, the "Full Screen Mode" appeared quickly, before the audio fully started, so I could see the text in time for the reading. 
    However, with Windows 8, "Full Screen Mode" takes around 5-10 seconds to appear at all, and a black screen is present throughout the wait.  It does the same thing when I hit "escape" to exit "Full Screen Mode" as well.  I even uninstalled Adobe Reader XI from my new laptop, and tried using Adobe Reader X, even though it is not recommened by Adobe to do that on Windows 8, in order to test the speed of "Full Screen Mode" there.  Adobe Reader X had the same problem!  I do not know if this can be fixed, but I am pretty unhappy about it!  I enjoyed the "Full Screen Mode" with my PDF chapters and the online bible audio!  Finding that function for the first time with Adobe Reader X was a delight for me!  It gave the reading a theater feel!
    Has anyone else here had a similiar problem with "Full Screen Mode" loading way too slow on Windows 8?  I am very disappointed!  If this cannot be fixed by a user, is there a place to complain to Adobe and make a recommendation for software improvement?  Thank you!             

    From: Test Screen Name [email protected]
    Sent: Sunday, August 04, 2013 11:32 AM
    To: gunner0490
    Subject: I'm not able to open PDF files in Adobe Reader XI.
    Re: I'm not able to open PDF files in Adobe Reader XI.
    created by Test Screen Name <http://forums.adobe.com/people/TestScreenName>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/5565198#5565198

  • My mac got too slow within certain minutes

    Hello,
    I've got a huge problem with my iMac: -
    iMac from 2012
    8GB Ram
    3,4 GHz i7 Quadcore
    1 TB hard disk
    AMD HD 6970M 2GB
    - within only minutes, my mac got unbelievable slow. Way too slow.
    Certain examples:
    My mac isn't able to show the clock on the dashboard fluently, that means, the second hand does two steps, and then the mac stops for 10-15 seconds. The again two steps, then it stops again..
    My mac is useless. After every click with the mouse, the colored circle comes up, and I have to wait for 10-15 seconds.
    I didn't change anything when this problem comes up. On the harddisk is more than 25% free space.
    I am absolutely confused and frustrated.
    I should tell you, that my windows partition on the Mac hard disc works without any problems, so actually the problem cannot be any hardware issues... I think..
    Please, Please help me, I need my mac.
    Greetings
    Tim

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen. Click the Clear Display icon in the toolbar. Then take one of the actions that you're having trouble with. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Macbook too slow

    My macbook is too slow suddenly. Have uninstalled most of the application and cleared trashed. Run Verify Disk and it showed disk is OK.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • TCP-IP ICOM is too slow?

    Hello everybody,
    I am new to DasyLab (I have good experience with labview though) and am trying to build up a TCP-IP Connection between a PLC and DasyLab10 using the ICOM module . So far I managed to build up a connection and send measured data to dasylab. There it gets decoded correctly and it even displays correctly after some fine-tuning in the options of that ICOM module. But the problem is, the ICOM module works too slow for my TCP-Server.
    I have two channels so far and I do send pakets with 2 floats in it every millisecond. No delimiter, no string, nothing else just 8 bytes. So its around 8kB/s. I had different delimiter in it, but some people stated out, that this could slow down the interpretation process.
    I tinkered around with packet-size on Dasylab as well as sending more then 2 floats per TCP-packet with no effect. The TCP-connection gets shut down(the server does it, because of an error) within some seconds after the buffer of DasyLab filled up.
    I got it working so far for a sample-rate of 1kHz and the packet-size of 1 with maximum CPU-Load on one core (With the "One Measurement per"-option: Gathermode), but only when the line-plotter is minimized. Then it behaves almost as intended. When I increase the packet-size within the ICOM module, than its gets laggy again, but the CPU-Load drops significantly. It seems to process the data considerably slower then with a packet-size of 1. It takes the ICOM Module between 2-10 seconds to process 1 sec of data depending on packet-size with higher packet-size resulting in a slower process. IThe global data-rate and packet-size does not seem to have any influence on that laggyness.
    The goal is actually a sample-rate of 2,5kHz with 25channels, which would be around 250kB/s on a direct crossover FastEthernet connection. It should be possible to save all the data to hdd as well as some sort of live view of the data like a line plotter. It would be okay if the plotter only refreshes every 10th second as long as it shows the data live(with no lag, correct timestamp) and completely(every data-point sent by the server is in there, no duplicates).
    The wiring diagram so far only includes one ICOM module plus a digital instrument and a line plotter. I have attached it to this message.
    Is my task really impossible with DasyLab? Do I need a faster PC? It has got a Core 2 Duo 2Ghz CPU. I feel like I am missing something important to get this up and running.
    Thanks in advance. Any help is appreciated.
    Have a nice day
    Philipp Michalski
    Attachments:
    Messdaten-1khz.DSB ‏18 KB

    Phillip,
    The module is simply not designed for high speed data. You have tried all of the settings... it suggests that DASYLab cannot keep up with the data stream even if you tell it that it's coming in at a rapid rate and to use a larger block.
    The only other option is to tackle writing a driver, or having someone write a driver for you. We have two ways to do that - DASYLab 13 Full version has the Script module, or you can purchased the Extension toolkit to write a module using C. 
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • IPhoto Gallery Uploads, Web Browsers Comments "Script too slow"

    I have been using iWeb in the past to share my pictures with friends. So when I could see I could use iPhoto to not only share them but let people download near full versions I scrapped the iWeb site I used so people could go to my Gallery to view or download.
    Now, I have well 40 Album and uploaded them all which used about half my 20GB iDisk (but thats mainly why I subscribed so dont mind). The problem is that the site flashes up an error message when you use even this most up-to-date version of "Safari", warning the user that the Scrip is too slow and the browser is in danger of hanging. Which 50% of the time it does.
    Does anyone know how to solve this or is it just a limitation of MobileMe thats yet to be resolved as thats one of the functions of the site I thought and 40+ Albums is not that OTT.
    Thanks

    Dan
    Start with a rebuild:
    Back Up and try rebuild the library: hold down the apple and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild.
    Regards
    TD

  • Getting attribute properties from client tier is too slow

    Getting properties for view object attributes is too slow, because a called to the server is made for every attribute.
    I noticed that when a property is gotten for an attribute all properties are retrieved for it, but I couldn't found a way to get all properties for all attributes in the ViewObject.

    See ApplicationModule.fetchAttributeProperties and it's usage in JClient in JDeveloper 9.0.3

  • Google Maps in Lightroom too slow

    Hello,
    I have the problem that the display velocity of the maps in Lightroom is very slow. When i am downloading the same map with a browser it is fast, so it couldn't be a question of the dan width of my internet provider.
    Has anyone the same problems?
    I am using Mac OS 10.9 and LR 5.7
    Hagen

    Sorry, yes i Have Yosemite
    Hagen
    Von meinem iPhone gesendet
    Am 01.12.2014 um 20:32 schrieb John R. Ellis <[email protected]>:
    Google Maps in Lightroom too slow
    created by John R. Ellis in Photoshop Lightroom - View the full discussion
    Are you sure you have OS X 10.9 (Mavericks) and not 10.10 (Yosemite)?  There is a widespread problem with LR Maps on OS X 10.10 (Yosemite):
    Lightroom: Issue with Map module in OS X 10.10 (Yosemite)
    Please repost in that thread, regardless of whether you have 10.9 or 10.10 (include your version of OS X, of course).
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/6975923#6975923 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/6975923#6975923
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Photoshop Lightroom by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • What software can I use on OS X Mavericks to burn my photos on a DVD? iDVD is too slow and crashes.

    I am using a late 2009 13" macbook pro with Mavericks. I want to backup my photos on multiple DVDs. I tried using the iDVD software that came with Leopard. iDVD keeps crashing and is too slow. Is there any good software that any of you has used?

    What version of iDVD are you using?  If it's version 7 but not the final 7.1.2 version download and run the iDVD 7.1.2 updater on the app.
    If you do have 7.1.2 try this basic troubleshooting fix:
    1 - delete the IDVD preference file, com.apple.iDVD.plist, that resides in your
    User/Home/Library/ Preferences folder.
    2 - delete IDVD'S cache file, Cache.db, that is located in your
    User/Home/Library/Caches/com.apple.iDVD folder. 
    3 - launch IDVD and try again.
    NOTE: In Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and press the Return key - 10.7: Un-hide the User Library folder.
    If you're running Mavericks, 10.9,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    OT

  • Converting NTSC to PAL in CS5, the audio is out of sync-too slow. What do I need to adjust?

    Hi. I had to purchase a new Sony video camera in USA (NTSC 29.9fps). We are PAL, so most of my holiday movie is PAL 16:9 widescreen. When I imported the clips from the NTSC camera, I converted the clips to PAL 25fps but the audio is out of sync and appears to be too slow. eg. a male voice is high pitched and not quite audible. Is it the 'bit rate' difference causing the problem and if so, how do I change that in CS5? The PAL clips off my old camera are imported as MPG files. The new camera files are MTS. I am not sure if this is important but would appreciate some help. Thanks.

    Adobe doesn't have any tools that perform adequate NTSC<=>PAL conversions, in my view.  You may be better off creating a separate video for the NTSC stuff, keeping it as NTSC.  Your player should be able to handle it fine.

  • Too slow FTP DW CS3 on a Mac?

    If your FTP transmissions in Dreamweaver CS3 on MacOsX are
    too slow, try the following:
    Go to » Preferences » Invisible Elements » and
    de-select every marked select-box on this page!
    Changing these settings makes a huge difference in
    Dreamweaver CS3 performance and FTP-speed.

    There is no command line interface in Dreamweaver. It's a tool for editing web pages.
    However, you can use Dreamweaver to set the permissions on web pages on your remote server like this:
    In the Files panel, select Remote view from the drop-down menu at the top right.
    Select the file(s)/folder(s) for which you want to change the permissions.
    Right-click and select Set Permissions from the context menu.
    Set the permissions in the dialog box that opens.
    As the dialog box warns you, this command does not work on all servers. If your remote server won't allow you to change permissions through Dreamweaver, you need to log into your hosting company's control panel, and change the permissions there. If you don't know how to do it through the control panel, ask your hosting company for help, as the method depends on the control panel used.

  • APO - SNP Alert Macros running too slow

    Hi,
    We have created alert macros which run for next 27 weeks for 38000 Product-Location Combinations. They are running too slow.
    We are deleting alerts externally using program /sapapo/amon_reorg and then running this macro with "ADD" . This macro slows down once it starts filling up alert table with 100,000 records. What are the best practices for writing the macro so that it runs fast ?.
    Thanks.

    Is it necessary to write all the alerts? What I mean is, do you filter the results when you view them through the Alert Monitor?
    If your alert profile has a minimum threshold set for an alert type, then you can read this threshold in the macro and only write alerts that fall below the threshold.
    e.g.
      Step: Get Threshold Values : ( 1 Iterations :Initial;Initial )
        Action Box: Get Threshold Value
          LAYOUTVARIABLE_SET( 'Alert_Thresh' ;
          ALERT_PROFILE_THRESH( SDP_ALERT_PROFILE' ; '4100' ; 'I' ) )
    Where SDP_ALERT_PROFILE is the profile that contain sthe minimum threshold you want to use and 4100 is the alert type. The I is for information, can use either W for Warning or E for Error as well.
    Then use the variable Alert_Thresh to check if your value falls below this, only then write the alert.
    Regards
    Ian

Maybe you are looking for

  • Issue in reverse engineering the model source is excel

    Hi Everyone, I am new to ODI, i am trying to export the excel file data into oracle table. For doing this created physical and logical schema for Excel file and Oracle database. Tried to created a Model and reverse engineer the excel file to get the

  • Timeout or interrupted waiting Start server Sun Java System AppServer 8.1

    Hi, i'm new in this. I have Windows Xp SP2 when i try to start AppServer in NetBeans IDE 4.1, netbeans give me this error "Start server Sun Java System Application Server 8.1 timeout or interrupted" I try to reinstall AppServer many times but nothing

  • Restriction for tag name and column name

    It seems that the XML tag name has to be the same as the corresponging column name when using xmlgen.insertXML. Is there any plan to relax this restriction? null

  • Change frame rate while preserving frame number

    Hi -- I have PAL stock footage that I want to change to 29.97 -- but without adding new frames. I do not need to preserve running time, just frame number and motion quality. Is there a "preserve number of frames" option somewhere in QTPro I can't fin

  • Retrieving Message ID of previous message

    Hi, I have created 2 Message Mappings and 2 Interface mappings in my scenario. Hence three messages(one branched message and two child messages) are getting generated. I need to retrieve msg ID of first child msg in MM of second message:I have used t