Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Operations in huge transaction slow down suddenly. Why?
Hi,
my problem is not very easy to explain. Basically what we're doing is an import of many records to the database. Therefore, at first we load the new data by creating new local tables with "Create Table as select * from ..." over a database link.
Then we have to merge the existing data with te newly loaded data. In this
step (roughly explained), new records were inserted in the existing tables.
Information about newr- and changes on existing data were reported as
conflicts into a separate table. These conflicts have to be resolved
manually after the import finishes.
This second step is running in one single transaction. Many thousands of
records were inserted into the table containing the conflicts.
Ok. Now what is the problem? After inserting about 15000 records into the conflict table and executing several thousand updates or inserts into the existing tables the process suddenly slows down. We detect this by writing a report entry containing a timestamp, every block of 500 processed steps.
The customer reported this problem because one block suddenly lasts about 24 hours.
We can not reproduce this problem here with these huge time ranges, but here you can see a snippet of a report where I reduced the size of each block to 200 steps for debugging reasons.
17.12.2004 12:42:28,0, *** Step : 11600 17.12.2004 12:42:28,0, delay : 17.12.2004 12:42:27 - 01:03:09 (00:01:53) 17.12.2004 12:45:25,0, *** Step : 11800 17.12.2004 12:45:25,0, delay : 17.12.2004 12:45:24 - 01:06:07 (00:02:57) 17.12.2004 12:46:32,0, *** Step : 12000 17.12.2004 12:46:32,0, delay : 17.12.2004 12:46:32 - 01:07:14 (00:01:07) 17.12.2004 12:52:59,0, *** Step : 12200 17.12.2004 12:52:59,0, delay : 17.12.2004 12:52:59 - 01:13:41 (00:06:26) 17.12.2004 13:28:51,0, *** Step : 12400 17.12.2004 13:28:51,0, delay : 17.12.2004 13:28:51 - 01:49:33 (00:35:52)
Here I stopped the process after getting no results after about two hours.
What we did until now is switching on sql tracing and timed statistics and writing snapshots with the "statspack" package. We get many results and I mean the following snippets could be interesting:
ERWEITERUNG,CODETYP,CODE,BEI,GUELTIGAB,GUELTIGBIS,NSGGUID,KONFLIKT,FELDNAME,
FELDWERTALT,FELDWERTNEU,IMPORTHINT,GGUID,INSERTTIMESTAMP,INSERTUSER,
UPDATETIMESTAMP,UPDATEUSER )
values
( :1,:2,:3,:4,:5,:6,:7,:8,:9,NULL,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,
:20,:21,:22 )
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 1
Misses in library cache during execute: 3
Optimizer goal: CHOOSE
Parsing user id: 98
VMDPIMPORT is a view on the table MDPIMPORT where the conflicts were reported into.
Another one is:
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 98
This an insert of a newly imported record.
Ok, that's it. If anyone has any suggestions what we could try next, or has an idea, what could be the reason for this, please answer this.
Thanks in advance and best regards
Bernhard Gräuler Received on Fri Dec 17 2004 - 10:01:12 CST