Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Execution Plan is good but HIGH CPU
Hi,
The developer was executing the SQL statement in the loop in procedure. After re-writing the code, now the performance is good.
Thanks
Muqthar Ahmed
-----Original Message-----
Sent: Tuesday, October 28, 2003 8:09 AM
To: Multiple recipients of list ORACLE-L
It's 800 sec for 5617 exec/fetch calls. It looks like it's a sql inside a cursor loop or stored proc that gets called from some app. If you are unhappy, try to get rid of the cursor logic and get everything done in one sql call.
Waleed
-----Original Message-----
Sent: Tuesday, October 28, 2003 12:24 AM
To: Multiple recipients of list ORACLE-L
Hi,
Execution plan looks good but the query is consuming 800 seconds CPU time........why?
SELECT sampleavail, sample_cost_amount, sample_sale_amount, discount_room, discount_case, discount_half_case, allow_cut, retail_cut_amount, cost_cut_amount, gp_room from tbljnwpbookvendortype t1, tbljnwpbookvendor t2 where t1.jnwpbvid = t2.jnwpbvid
and t2.prsuid = :b3 and t2.wpbkid = :b2 and t1.wpptid = :b1 call count cpu elapsed disk query currentrows
Misses in library cache during parse: 0
Optimizer goal: CHOOSE
Parsing user id: 109 (DDTBL) (recursive depth: 1)
Rows Execution Plan
------- --------------------------------------------------- 0 SELECT STATEMENT GOAL: CHOOSE 0 NESTED LOOPS 0 TABLE ACCESS (BY INDEX ROWID) OF 'TBLJNWPBOOKVENDOR' 0 INDEX (UNIQUE SCAN) OF 'TBLJNWPBOOKVENDOR_UQ1' (UNIQUE) 0 TABLE ACCESS (BY INDEX ROWID) OF 'TBLJNWPBOOKVENDORTYPE' 0 INDEX (RANGE SCAN) OF 'TBLJNWPBOOKVENDORTYPE_IDX1' (NON-UNIQUE) ****************************************************************************
Muqthar Ahmed
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Muqthar Ahmed
INET: Muqthar.Ahmed_at_decoratetoday.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Oct 28 2003 - 11:44:31 CST