Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: INSERT...SELECT pegs CPU, but is waiting on scattered read?

RE: INSERT...SELECT pegs CPU, but is waiting on scattered read?

From: Cary Millsap <cary.millsap_at_hotsos.com>
Date: Thu, 29 Apr 2004 14:08:59 -0500
Message-ID: <005e01c42e1d$70cae190$6701a8c0@CVMLAP02>


If you can still connect to Oracle, you'll probably see a tremendous amount of activity reflected in V$SESS_IO.BLOCK_GETS and ~.CONSISTENT_GETS. Cut the SELECT statement into a SQL*Plus session and go to work on "tuning the SQL." This (a SQL tuning issue) is almost undoubtedly the cause of your problem.

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
* Nullius in verba *

Upcoming events:
- Performance Diagnosis 101: 5/7 Dallas, 5/18 New Jersey, 6/22
Pittsburgh
- SQL Optimization 101: 5/3 Boston, 5/24 San Diego, 6/14 Chicago

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jesse, Rich Sent: Thursday, April 29, 2004 1:59 PM
To: 'oracle-l_at_freelists.org'
Subject: RE: INSERT...SELECT pegs CPU, but is waiting on scattered read?

To make matters worse, the process is completely hung now, being 100% CPU
bound with zero I/O:



PARSING IN CURSOR #33 len=761 dep=1 uid=105 oct=2 lid=105 tim=952209474 hv=1784939705 ad='e6f44c20'
INSERT INTO part_usage_tmp
SELECT
ph.partno
, DECODE(ph.warehouse,:"SYS_B_00",:"SYS_B_01",NULL,:"SYS_B_02", ph.warehouse) warehouse
, ph.transqty
FROM
QT_PART_HISTORY_24_MONTHS ph
, glxref gl
WHERE
ph.ACCOUNTNO = gl.ACCOUNTNO
AND gl.ENTITY_CODE = :"SYS_B_03"
AND ph.fiscal_year BETWEEN :"SYS_B_04" AND TO_NUMBER(TO_CHAR(TRUNC(SYSDATE), :"SYS_B_05")) AND TO_DATE(SUBSTR(TIME_STAMP,:"SYS_B_06",:"SYS_B_07"),:"SYS_B_08") BETWEEN
:"SYS_B_09" AND LAST_DAY(ADD_MONTHS(TRUNC(SYSDATE),-:"SYS_B_10")) AND ph.transtype IN (:"SYS_B_11",:"SYS_B_12",:"SYS_B_13") AND gl.PRICELISTNO LIKE :"SYS_B_14"
END OF STMT
PARSE #33:c=0,e=0,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=952209474

It's been sitting here now for 15 minutes (more?) in a tight CPU loop.

Joy.

Rich



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Apr 29 2004 - 14:08:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US