Query slow down when added a where clause

I have a procedure that has performance issue, so I copy some of the query and run in the sql plus and try to spot which join cause the problem, but I get a result which I can figuer out why. I have a query which like below:
Select Count(a.ID) From TableA a
-- INNER JOIN other tables
WHERE a.TypeID = 2;
TableA has 140000 records, when the where clause is not added, the count return quite quick, but if I add the where clause, then the query slow down and seems never return so I have to kill my SQL Plus session. TableA has index on TypeID and TypeID is a number type. When TablA has 3000 records, the procedure return very quick, but it slow down and hang there when the TableA contains 140000 records. Any idea why this will slow down the query?
Also, the TypeID is a foreign key to another table (TableAType), so the query above can written as :
Select Count(a.ID) From TableA a
-- INNER JOIN other tables
INNER JOIN TableAType atype ON a.TypeID = atype.ID
WHERE atype.Name = 'typename';
TableAType table is a small table only contains less than 100 records, in this case, would the second query be more efficient to the first query?
Any suggestions are welcome, thanks in advance...
Message was edited by:
user500168

TableA now has 230000 records and 28000 of them has the TypeID 2.
I haven't use the hint yet but thank you for your reply which let me to to run a query to check how many records in TableA has TypeID 2. When I doing this, it seems pretty fast. So I begin with the select count for TableA only and gradually add table to join and seems the query is pretty fast as long as TableA is the fist table to select from.
Before in my query TableA is the second table to join from, there is another table (which is large as well but not as large as TableA) before TableA. So I think this is why it runs slow before. I am not at work yesterday so the query given in my post is based on my roughly memory and I forget to mention another table is joined before TableA, really sorry about that.
I think I learn a lesson here, the largest table need to be in the begining of the select statement...
Thank you very much everyone.

Similar Messages

  • PSE 10 system slows down when adding files to catalog

    I recently switched from PSE 3 to PSE10 and had issues converting the catalog.  I never did resolve those so I decided to start with creating a new catalog in PSE 10.  My first session of adding photos worked fine.  When I restarted the task the next day, I was asked in participating in making the product better by sharing information about my use with Adobe.  I agreed to participate and very quickly noticed that my computer slowed considerably when adding photos from my hard drive.  The process still worked but I experienced a dramatic increase in the time it took for photos to be added (e.g. the cursor spins for a couple of minutes while the task is working).  I went under my account preferences and opted out of the product participation program but the problem has persisted.  I rebooted the computer to see if that would help but it has not.  I have turned off all media analysis and both optimized and repaired my catalog and while this has provided some improvement, there are still instances where the system slows down.  Now it seems that every other folder's worth of pictures (does not matter how many photos) I add causes this delay.
    I appreciate any help anyone can provide in determining why this slow down keeps occuring. 
    FYI, I am running a new Windows 7, 64-bit system with 8GB DDR-3-1066MHz, and 2 TB hard drive.

    Have you also edited the Preferences (Performance) to increase the amount of RAM that PSE can use?
    Do you have many background processes running?  Having a single HDD means that everything running on your computer has to wait in the queue for disk access.
    How many photos are you importing?
    What file types are the photos?
    How large are the photos?
    Ken

  • Update query running fine when subquery in where clause is wrong.

    Hi,
    I am running one update statement-
    Update table a set column1=2000
    where a.column2 in(select col 3 from Table b where b.col4=111)
    Now when I run the subquery: select col 3 from Table b where b.col4=111-----> It gives me error "col 3 invalid identifier"
    But when I run the full query then it updates the 700 rows.
    Can somebody please explain this?
    My subquery is throwing error but when i use that in another query it is running fine.

    Col_3 must be in your outer table (table_a, I guess).
    If you always prefixed column names with a table alias, you'd know in an instant.

  • My Macbook Pro Stops running as normal, when it is not connected to the charger. Once it goes off the plug, it slows down to a point where it is not usable.

    My Macbook Pro Stops running as normal, when it is not connected to the charger. Once it goes off the plug, it slows down to a point where it is not usable. is there any fix to this?

    https://support.apple.com/kb/HT3964

  • Excel slows down when network drive is mapped

    Since a couple of months we are experiencing strange behaviour of excel (2011) on Lion 10.7.5
    Excel versions from 14.3.1. to 14.3.4 all the same behaviour.
    Symptom 1)
    When I connect the Time Capsule drive , Excel slows down by factor 100 when entering text. Needs up to 2 seconds to react on a key stroke.
    When I disconnect the handle, excel works fast again.
    (repeatable, reproducible)
    Symptom 2)
    on the network drive, always at the same place, a file named ~abcde.xls... occurs (exact name forgotten, but it is a recent file name
    preceded with a tilde sign)
    deleting of the file does not affect speed
    the file reappears occasionally (TC backup is switched off!)
    Where is the ghost??? :-D
    maybe these symptoms are uncorrelated.
    Why the heck does Excel slow down when I open the network drive??
    Why does this happen on 10.7.5 and not on 10.6.8?
    Anyone any idea?
    thanks,
    Stefan

    Thanks. Away on holiday right now, but will do it as soon as I get back next week.
    Out of curiosity, the external drive works fine when connected directly via USB to the laptop. I took that to mean that the problem wasn't to do with the drive, but probably the network. Is it possible there could be a problem with the drive which only shows up when it's used as a network drive?

  • Internet speed slows down when connected via airport express

    Internet speed slows down when connecting via airport express. When connecting directly via the timecapsulethe internet speed is ok, when connecting via the airport express the speed slows down.What can I do to change that? Any suggestions?

    Turn off the AirPort Express completely as a test, and move your computer very close to the location of the Express.
    As I said before, the Express can only extend the bandwidth (speed) that it receives from the Time Capsule, so the speed that you see there with the Express powered off will be the fastest speed of which the Express is capable.
    The Express will make the signal go further when it extends....but it will not make the signal go faster.
    A good location for a device that extends wirelessly is a point that is about half the distance from the Time Capsule and the general area that needs more wireless coverage.
    If you locate the AirPort Express too far from the Time Capsule or there are more than a couple of walls in the signal path, the signal will be very slow by the time that it reaches the Express....and the Express simply extends a signal that has already slowed down significantly.
    If you already have the Express located about half the distance between the Time Capsule and general area that needs more wireless coverage, how many walls, ceilings or other obstructions are there in the signal path between the Time Capsule, the AirPort Express and the area that needs more coverage?
    Often, due to obstructions, it is just not possible to achieve good performance when you try to extend a network wirelessly. The solution is connect the AirPort Express to the Time Capsule using a wired Ethernet connection.
    There is virtually no signal loss with this type of connection, so the Express can be located exactly where it is needed and it will produce a much faster wireless signal in this type of setup.

  • Hi Everyone.  I have an old Mac Book.  I have saved a ton of emails in my inbox 'On My Mac'.  There are so many it is slowing down my computer.  Where do I find the folder with all the emails so I can cut and paste them to an external hard drive?Pls.help.

    Hi Everyone.  I have an old Mac Book with software updated to 10.6.8.  I have saved a ton of emails in my inbox 'On My Mac'.  There are so many it is slowing down my computer.  Where do I find the folder with all the emails so I can cut and paste them to an external hard drive? Pls.help.  Tks.

    Depending on which email client software you use
    the files should be in 'your home folder' library, esp.
    if you use Mail application.... ~/Library/Mail
    Since you don't specify what mail application,
    that would most be associated with the file.
    I notice there are some items to the right of your post
    where it says "more like this' so that may be worth a
    look to see if similar issues were answered. Also, the
    Help viewer in your system is a searchable database.
    Seems that google also brings up fair information, too.
    Do you have a complete bootable clone of your entire
    Mac system on an externally enclosed hard disk drive?
    Good luck & happy computing!

  • Songs slowing down when I type

    I'm running iTunes 7.7.1 on a new computer. iTunes had no problem on my old one, but on my new one, the songs slow down when I type, which is rather annoying, since I listen to music while, you know, typing. I'm on WinXP Pro, and everthing else is working great. Any ideas?

    What tools, Mostly I work with iWeb using iPhoto, Aperture, Photoshop TeXture Adobe FormsCentral for Acrobat etc. making and editing Web Sites. Often I have many Apps open simultanously.

  • HELP - 88.2 k 24-bit wav file is slowing down when imported to garageband

    i have an 88.2 k 24-bit wav file that is slowing down when imported to garageband. How do i get around this problem?

    You need to convert it to 44.1 16 bit. You can do that with iTunes.

  • Safari browser seems to slow down when working with my wifi ASUS AC 68U router

    safari browser seems to slow down when working with my wifi ASUS AC 68U router - any ideas on why?

    Is your problem with Safari on the iPad, or some MacBook Air?
    Are you sure that the ASUS firmware is tested with the device having trouble and its operating system?
    Note: MacBook Airs do not run iOS.  They run Mac OS X, Windows or Linux.

  • Slow down when processing image clipping in photo shop with pen tool

    Adobe cs5 slow down when processing image clipping use with pen tool. The path is applying after few seconds when we draw on the image. My system supporting 4 GB memory with 64 bit.

    The main thing i use paths for in photoshop is extracting objects from photos.
    Other uses include stroking paths with the paint tools. For example, if you had
    a powerline to remove, one could trace the line with the pen tool and then stroke
    the path with spot healing brush set to content aware fill.
    more info on photoshop paths:
    http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-73ada.h tml
    MTSTUNER

  • Why can't i access my itunes anymore? whenever i click on it, it makes my laptop freeze/slow down to the point where not even ctrl alt delete works properly and i have to turn the laptop off and then back on to get anything done.

    why can't i access my itunes anymore? whenever i click on it, it makes my laptop freeze/slow down to the point where not even ctrl alt delete works properly and i have to turn the laptop off and then back on to get anything done. it has been this way for the last 2/3 days now and i have uninstalled and reinstalled it but it doesnt work

    Hello there, bobbiefromIRL.
    The following Knowledge Base article goes over some great steps for troubleshooting your issue:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Response time of query utterly upside down because of small where clause change

    Hello,
    I'm wondering why a small change on a where clause in a query has a dramatic impact on its response time.
    Here is the query, with its plan and a few details:
    select * from (
    SELECT xyz_id, time_oper, ...
         FROM (SELECT 
                        d.xyz_id xyz_id,
                        TO_CHAR (di.time_operation, 'DD/MM/YYYY') time_oper,
                        di.time_operation time_operation,
                        UPPER (d.delivery_name || ' ' || d.delivery_firstname) custname,
                        d.ticket_language ticket_language, d.payed,
                        dsum.delivery_mode delivery_mode,
                        d.station_delivery station_delivery,
                        d.total_price total_price, d.crm_cust_id custid,
                        d.bene_cust_id person_id, d.xyz_num, dpe.ers_pnr ers_pnr,
                        d.delivery_name,
                        TO_CHAR (dsum.first_travel_date, 'DD/MM/YYYY') first_traveldate,
                        d.crm_company custtype, UPPER (d.client_name) partyname,
                        getremark(d.xyz_num) remark,
                        d.client_app, di.work_unit, di.account_unit,
                        di.distrib_code,
                        UPPER (d.crm_name || ' ' || d.crm_firstname) crm_custname,
                       getspecialproduct(di.xyz_id) specialproduct
                   FROM xyz d, xyz_info di, xyz_pnr_ers dpe, xyz_summary dsum
                  WHERE d.cancel_state = 'N'
                 -- AND d.payed = 'N'
                    AND dsum.delivery_mode NOT IN ('DD')
                    AND dsum.payment_method NOT IN ('AC', 'AG')
                    AND d.xyz_blocked IS NULL
                    AND di.xyz_id = d.xyz_id
                    AND di.operation = 'CREATE'
                    AND dpe.xyz_id(+) = d.xyz_id
                    AND EXISTS (SELECT 1
                                  FROM xyz_ticket dt
                                 WHERE dt.xyz_id = d.xyz_id)
                    AND dsum.xyz_id = di.xyz_id
               ORDER BY di.time_operation DESC)
        WHERE ROWNUM < 1002
    ) view
    WHERE view.DISTRIB_CODE in ('NS') AND view.TIME_OPERATION > TO_DATE('20/5/2013', 'dd/MM/yyyy')
    plan with "d.payed = 'N'" (no rows, *extremely* slow):
    | Id  | Operation                          | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                   |                  |  1001 |  4166K| 39354   (1)| 00:02:59 |
    |*  1 |  VIEW                              |                  |  1001 |  4166K| 39354   (1)| 00:02:59 |
    |*  2 |   COUNT STOPKEY                    |                  |       |       |            |          |
    |   3 |    VIEW                            |                  |  1001 |  4166K| 39354   (1)| 00:02:59 |
    |   4 |     NESTED LOOPS OUTER             |                  |  1001 |   130K| 39354   (1)| 00:02:59 |
    |   5 |      NESTED LOOPS SEMI             |                  |   970 |   111K| 36747   (1)| 00:02:47 |
    |   6 |       NESTED LOOPS                 |                  |   970 |   104K| 34803   (1)| 00:02:39 |
    |   7 |        NESTED LOOPS                |                  |   970 | 54320 | 32857   (1)| 00:02:30 |
    |*  8 |         TABLE ACCESS BY INDEX ROWID| XYZ_INFO         |    19M|   704M| 28886   (1)| 00:02:12 |
    |   9 |          INDEX FULL SCAN DESCENDING| DNIN_IDX_NI5     | 36967 |       |   296   (2)| 00:00:02 |
    |* 10 |         TABLE ACCESS BY INDEX ROWID| XYZ_SUMMARY      |     1 |    19 |     2   (0)| 00:00:01 |
    |* 11 |          INDEX UNIQUE SCAN         | SB11_DSMM_XYZ_UK |     1 |       |     1   (0)| 00:00:01 |
    |* 12 |        TABLE ACCESS BY INDEX ROWID | XYZ              |     1 |    54 |     2   (0)| 00:00:01 |
    |* 13 |         INDEX UNIQUE SCAN          | XYZ_PK           |     1 |       |     1   (0)| 00:00:01 |
    |* 14 |       INDEX RANGE SCAN             | DNTI_NI1         |    32M|   249M|     2   (0)| 00:00:01 |
    |  15 |      TABLE ACCESS BY INDEX ROWID   | XYZ_PNR_ERS      |     1 |    15 |     4   (0)| 00:00:01 |
    |* 16 |       INDEX RANGE SCAN             | DNPE_XYZ         |     1 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
      1 - filter("DISTRIB_CODE"='NS' AND "TIME_OPERATION">TO_DATE(' 2013-05-20', 'syyyy-mm-dd'))
      2 - filter(ROWNUM<1002)
      8 - filter("DI"."OPERATION"='CREATE')
    10 - filter("DSUM"."DELIVERY_MODE"<>'DD' AND "DSUM"."PAYMENT_METHOD"<>'AC' AND "DSUM"."PAYMENT_METHOD"<>'AG')
    11 - access("DSUM"."XYZ_ID"="DI"."XYZ_ID")
    12 - filter("D"."PAYED"='N' AND "D"."XYZ_BLOCKED" IS NULL AND "D"."CANCEL_STATE"='N')
                  ^^^^^^^^^^^^^^
    13 - access("DI"."XYZ_ID"="D"."XYZ_ID")
    14 - access("DT"."XYZ_ID"="D"."XYZ_ID")
    16 - access("DPE"."XYZ_ID"(+)="D"."XYZ_ID")
    plan with "d.payed = 'N'" (+/- 450 rows, less than two minutes):
    | Id  | Operation                          | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                   |                  |  1001 |  4166K| 58604   (1)| 00:04:27 |
    |*  1 |  VIEW                              |                  |  1001 |  4166K| 58604   (1)| 00:04:27 |
    |*  2 |   COUNT STOPKEY                    |                  |       |       |            |          |
    |   3 |    VIEW                            |                  |  1002 |  4170K| 58604   (1)| 00:04:27 |
    |   4 |     NESTED LOOPS OUTER             |                  |  1002 |   130K| 58604   (1)| 00:04:27 |
    |   5 |      NESTED LOOPS SEMI             |                  |  1002 |   115K| 55911   (1)| 00:04:14 |
    |   6 |       NESTED LOOPS                 |                  |  1476 |   158K| 52952   (1)| 00:04:01 |
    |   7 |        NESTED LOOPS                |                  |  1476 | 82656 | 49992   (1)| 00:03:48 |
    |*  8 |         TABLE ACCESS BY INDEX ROWID| XYZ_INFO         |    19M|   704M| 43948   (1)| 00:03:20 |
    |   9 |          INDEX FULL SCAN DESCENDING| DNIN_IDX_NI5     | 56244 |       |   449   (1)| 00:00:03 |
    |* 10 |         TABLE ACCESS BY INDEX ROWID| XYZ_SUMMARY      |     1 |    19 |     2   (0)| 00:00:01 |
    |* 11 |          INDEX UNIQUE SCAN         | AAAA_DSMM_XYZ_UK |     1 |       |     1   (0)| 00:00:01 |
    |* 12 |        TABLE ACCESS BY INDEX ROWID | XYZ              |     1 |    54 |     2   (0)| 00:00:01 |
    |* 13 |         INDEX UNIQUE SCAN          | XYZ_PK           |     1 |       |     1   (0)| 00:00:01 |
    |* 14 |       INDEX RANGE SCAN             | DNTI_NI1         |    22M|   168M|     2   (0)| 00:00:01 |
    |  15 |      TABLE ACCESS BY INDEX ROWID   | XYZ_PNR_ERS      |     1 |    15 |     4   (0)| 00:00:01 |
    |* 16 |       INDEX RANGE SCAN             | DNPE_XYZ         |     1 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("DISTRIB_CODE"='NS' AND "TIME_OPERATION">TO_DATE(' 2013-05-20', 'syyyy-mm-dd'))
       2 - filter(ROWNUM<1002)
       8 - filter("DI"."OPERATION"='CREATE')
      10 - filter("DSUM"."DELIVERY_MODE"<>'DD' AND "DSUM"."PAYMENT_METHOD"<>'AC' AND "DSUM"."PAYMENT_METHOD"<>'AG')
      11 - access("DSUM"."XYZ_ID"="DI"."XYZ_ID")
      12 - filter("D"."XYZ_BLOCKED" IS NULL AND "D"."CANCEL_STATE"='N')
      13 - access("DI"."XYZ_ID"="D"."XYZ_ID")
      14 - access("DT"."XYZ_ID"="D"."XYZ_ID")
      16 - access("DPE"."XYZ_ID"(+)="D"."XYZ_ID")
    XYZ.PAYED values breakdown:
    P   COUNT(1)
    Y   12202716
    N    9430207
    tables nb of records:
    TABLE_NAME           NUM_ROWS
    XYZ                  21606776
    XYZ_INFO            186301951
    XYZ_PNR_ERS           9716471
    XYZ_SUMMARY          21616607
    Everything that comes inside the "select * from(...) view" parentheses is defined in a view. We've noticed that the line "AND d.payed = 'N'" (commented above) is the guilty clause: the query takes one or two seconds to return between 400 and 500 rows if this line is removed, when included in the query, the response time then switches to *hours* -sic !- but then the result set is empty (no rows returned). The plan is exactly the same whether this "d.payed = 'N'" is added or removed, I mean the nb of steps, access paths, join order etc., only the rows/bytes/cost columns values change, as you can see.
    We've found no other way of solving this perf issue but by taking out this "d.payed = 'N'" condition and setting it outside the view along with view.DISTRIB_CODE and view.TIME_OPERATION.
    But we would like to understand why such a small change on the XYZ.PAYED column turns everything upside down that much, and we'd like to be able to tell the optimizer to perform this check on payed = 'N' by itself in the end, just like we did, through the use of a hint if possible...
    Anybody ever encountered such a behaviour before ? Do you have any advice regarding the use of a hint to reach the same response time as that we've got by setting the payed = N condition outside of the view definition ??
    Thanks a lot in advance.
    Regards,
    Seb

    I am really sorry I couldn't get back earlier to this forum...
    Thanks to you all for your answers.
    First I'd just like to correct a small mistake I made, when writing
    "the query takes one or two seconds": I meant one or 2 *minutes*. Sorry.
    > What table/columns are indexed by "DNTI_NI1"?
    aaaa.dnti_ni1 is an index ON aaaa.xyz_ticket(xyz_id, ticket_status)
    > And what are the indexes on xyz table?
    Too many:
    XYZ_ARCHIV_STATE_IND           ARCHIVE_STATE
    XYZ_BENE_CUST_ID_IND           BENE_CUST_ID
    XYZ_BENE_TTL_IND               BENE_TTL
    XYZ_CANCEL_STATE_IND           CANCEL_STATE
    XYZ_CLIENT_APP_NI              CLIENT_APP
    XYZ_CRM_CUST_ID_IND            CRM_CUST_ID
    XYZ_DELIVE_MODE_IND            DELIVERY_MODE
    XYZ_DELIV_BLOCK_IND            DELIVERY_BLOCKED
    XYZ_DELIV_STATE_IND            DELIVERY_STATE
    XYZ_XYZ_BLOCKED                XYZ_BLOCKED
    XYZ_FIRST_TRAVELDATE_IND       FIRST_TRAVELDATE
    XYZ_MASTER_XYZ_IND             MASTER_XYZ_ID
    XYZ_ORG_ID_NI                  ORG_ID
    XYZ_PAYMT_STATE_IND            PAYMENT_STATE
    XYZ_PK                         XYZ_ID
    XYZ_TO_PO_IDX                  TO_PO
    XYZ_UK                         XYZ_NUM
    For ex. XYZ_CANCEL_STATE_IND on CANCEL_STATE seems superfluous to me, as the column may only contain Y or N (or be null)...
    > Have you traced both cases to compare statistics? What differences did it reveal?
    Yes but it only shows more of *everything* (more tables blocks accessed, the same
    for indexes blocks, for almost all objects involved) for the slowest query !
    Greping WAIT on the two trc files made for every statement and counting the
    object IDs access show that the quicker query requires much less I/Os; the
    slowest one overall needs much more blocks to be read (except for the indexes
    DNSG_NI1 or DNPE_XYZ for example). Below I replaced obj# with the table/index
    name, the first column is the figure showing how many times the object was
    accessed in the 10053 file (I ctrl-C'ed my second execution ofr course, the
    figures should be much higher !!):
    [login.hostname] ? grep WAIT OM-quick.trc|...|sort|uniq -c
        335 XYZ_SUMMARY
      20816 AAAA_DSMM_XYZ_UK (index on xyz_summary.xyz_id)
        192 XYZ
       4804 XYZ_INFO
        246 XYZ_SEGMENT
          6 XYZ_REMARKS
         63 XYZ_PNR_ERS
        719 XYZ_PK           (index on xyz.xyz_id)
       2182 DNIN_IDX_NI5     (index on xyz.xyz_id)
        877 DNSG_NI1         (index on xyz_segment.xyz_id, segment_status)
        980 DNTI_NI1         (index on xyz_ticket.xyz_id, ticket_status)
        850 DNPE_XYZ         (index on xyz_pnr_ers.xyz_id)
    [login.hostname] ? grep WAIT OM-slow.trc|...|sort|uniq -c
       1733 XYZ_SUMMARY
      38225 AAAA_DSMM_XYZ_UK  (index on xyz_summary.xyz_id)
       4359 XYZ
      12536 XYZ_INFO
         65 XYZ_SEGMENT
         17 XYZ_REMARKS
         20 XYZ_PNR_ERS
       8598 XYZ_PK
       7406 DNIN_IDX_NI5
         29 DNSG_NI1
       2475 DNTI_NI1
         27 DNPE_XYZ
    The overwhelmingly dominant wait event is by far 'db file sequential read':
    [login.hostname] ? grep WAIT OM-*elect.txt|cut -d"'" -f2|sort |uniq -c
         36 SQL*Net message from client
         38 SQL*Net message to client
    107647 db file sequential read
          1 latch free
          1 latch: object queue header operation
          3 latch: session allocation
    > It will be worth knowing the estimations...
    It show the same plan with a higher cost when PAYED = N is added:
    SQL> select * from sb11.dnr d
      2* where d.dnr_blocked IS NULL and d.cancel_state = 'N'
    SQL> /
    | Id  | Operation                   | Name                 | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |                      |  1002 |   166K|    40   (3)| 00:00:01 |
    |*  1 |  TABLE ACCESS BY INDEX ROWID| XYZ                  |  1002 |   166K|    40   (3)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | XYZ_CANCEL_STATE_IND |       |       |     8   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("D"."XYZ_BLOCKED" IS NULL)
       2 - access("D"."CANCEL_STATE"='N')
    SQL> select * from sb11.dnr d
      2  where d.dnr_blocked IS NULL and d.cancel_state = 'N'
      3* and d.payed = 'N'
    SQL> /
    Execution Plan
    Plan hash value: 1292668880
    | Id  | Operation                   | Name                 | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |                      |  1001 |   166K|    89   (3)| 00:00:01 |
    |*  1 |  TABLE ACCESS BY INDEX ROWID| XYZ                  |  1001 |   166K|    89   (3)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | XYZ_CANCEL_STATE_IND |       |       |    15   (0)| 00:00:01 |

  • Itunes slows down when sharing music is enabled

    hi,
    i searched through the forums and i didn't see that exact issue so i decided to post it.
    as soon as i share my library itunes completely slows down.
    - starting to play songs takes 5 seconds and displays the rotating rainbow circle
    - rating songs takes 5 seconds also and displays the rotating rainbow circle
    - resuming play after pausing also
    there are two more interesting issues:
    - i have a few albums where it doesn't happen! the albums aren't encoded different, have the same version of tags, are on the same drive in an adjacent folder. i tried reimporting songs, placing it into different folders or harddrives. no changes.
    - only 2% of my library is shared and it seems like most of it is recently added music. but: no differences in encoding, tags, place on the harddrive. renaming, readding, moving the files didn't change the situation.
    i also disabled automatic updating of playlists, deleted all my playlist folders, reinstalled itunes, tried basically everything.
    what does itunes do in the network when playing, rating songs, ...? i'm using a fast wlan, but i don't think that's the issue or does itunes reexport the xml-file after every play? has it something to do with auto-update-play-counts after every song (which i couldn' find in the preferences)?
    any help would be greatly appreciated!
    regards,
    eric.
    by the way: i'd loooooove to see pandora-like functionality in the next major versin of itunes!!! :)))

    When you are sharing your iTunes, any other users you share with are accessing your hard drive and music foilder simultaneously with you. Since shared users are not playing exactly the same song at the same time as you, your hard drive's heads are scanning and reading from more points than they would be with you alone listening. There is a need to cache some part of the files for sharing, and that uses a bit of your RAM too. I guess it would be similar to saying that your car drives fine as long as you are driving it alone. Pile a few friends in with you, tow their cars behind yours, and suddenly, your car has nowhere near the performance it did with just you in it. Aside from adding more RAM, buying a fatser hard drive or stepping up your processor, this is simply an issue with sharing one system between more than one user at the same time, and it can't be remedied.

  • Query slows down after upgrade

    Hi,
    After upgrade from oracle 10 to oracle 11 a simple query is slowing down alot.
    Same amount of records, same table only the execution cost time is increased
    Can someone give me some feedback over this problem?
    Can I check some things to look into the problem?
    Thx in advance.
    Greetings
    query:
    Select nvl(sum(a.BM_OPENSTAAND_DEBET- a.BM_OPENSTAAND_CREDIT),0)
    from bh.bh123gh a
    where
    a.F123_AR_NR>='4400000000' and
    a.F123_AR_NR<='4404000000' and
    a.F123_KL_LEV_AR_NR='0631001000' and
    a.SRT_REK=2 and
    a.F123_BKJR>=0000 and
    a.F123_BKJR<=2011 and
    a.F123_FIRMA=2
    explain plans
    oracle 11
    cost 1,792
    Bytes: 38
    Cardinality: 1
    oracle 10
    cost 1,594
    Bytes: 38
    Cardinality: 1

    >
    After upgrade from oracle 10 to oracle 11 a simple query is slowing down alot.
    Same amount of records, same table only the execution cost time is increased
    Can someone give me some feedback over this problem?
    Can I check some things to look into the problem?
    Thx in advance.
    >
    Is it just one query or all queries are behaving strangely? If it's just one query, do a trace and see where it's slowing down.
    In the meanwhile, you can also modify the optimizer_features_enable parameter at session level and check the explain plan.
    Alter session set optimizer_features_enable='10.2.0.5';
    Now test the query.
    By the way, if you are just worried about the COST factor, you can just ignore it. COST by itself has no real meaning. You will only have to look at the response time.
    Regards

Maybe you are looking for

  • Have a question about  using functions  in JSP 2.0

    Hello, Does someone try to create functions in JSP2.0? the following codes is from http://developer.java.sun.com/developer/technicalArticles/javaserverpages/JSP20/ Code Sample:math.jsp <%@ taglib prefix="my" uri="http://jakarta.apache.org/tomcat/jsp2

  • Path to SapWorkDir

    Hi, Is there in abap, parameters which sored path to SapWorkDir and which could be given in FM 'WS_DOWNLOAD' as filename parameter? regards, Joanna Edited by: Joanna Lazarz on Apr 14, 2008 12:07 PM

  • Adding custom buttons to UITableViewCell - iphone

    Hello all. I have a question for the iphone developers, I want to add several buttons to a UITableViewCell in a grouped TableView I have set up. The requirements are this: 1) Place two buttons together in a view. 2) Add up to 4 of these views to a UI

  • Unable to update 3GS

    Everytime I try to download the update, it just stops at 377.9MG and an error message pops up,'There was a problem downloading the software for the iPhone "iPhone". The network connection timed out. Is this problem because of my internet or is it som

  • Convert UIImage from NSData

    When you get image information, is coded as below. CGImageRef spriteImage = [UIImage imageNamed:fileName].CGImage; But that does not support the type of image file i want to get the information. So, i coded as below. NSData* fileData = [NSData dataWi