Anonymous block performing much worse then separated statements
From: Douglas Cowles <dcowles_at_us.ibm.com>
Date: Wed, 27 Jul 2011 12:44:10 -0400
Message-ID: <OF5AD083D3.D3A8F76E-ON852578DA.005B8B79-852578DA.005BEF5F_at_us.ibm.com>
Basically.. oracle 10.2.0.4 on solaris.
Date: Wed, 27 Jul 2011 12:44:10 -0400
Message-ID: <OF5AD083D3.D3A8F76E-ON852578DA.005B8B79-852578DA.005BEF5F_at_us.ibm.com>
Basically.. oracle 10.2.0.4 on solaris.
I two statements that when are executed separately, a truncate and an
insert - they run in seconds.
When put in an anonymous block, they take more than 20 minutes and begin
to throw errors.
Does anyone have any explanation for this?
the block looks something like this -
BEGIN
TRUNCATE_TABLE('WANDH_HR');
INSERT INTO WANDH_HR(EMPLID,STATE,CREATE_TS,MAINT_TS)
(SELECT
A.EMPLID
,'NJ' As "STATE"
,'12-Jul-2011' As "CREATE_TS"
,'12-Jul-2011' As "MAINT_TS"
FROM (
.
.
.etc.,
.
.
END; Doug Cowles
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Jul 27 2011 - 11:44:10 CDT