delete statement taking long time [message #272812] |
Sun, 07 October 2007 15:11 |
el33t
Messages: 29 Registered: October 2007
|
Junior Member |
|
|
I'm deleting some 5 lakh records from a table and it has been running for more than 4 hours now.
OS: RHEL 4 kernel 2.6.9-55.0.6 ELsmp
Database: Oracle 10G(10.2.0.1.0)
Server config: AMD Opteron Dual CPU @ 2.0 Ghz, 8GB RAM, SCSI in RAID.
I can't seem to find the progress of the query from "V$session_longops" either.
Checking output of command:
# sar -P ALL 2 100
03:12:44 PM CPU %user %nice %system %iowait %idle
03:12:46 PM all 26.43 0.00 3.87 0.12 69.58
03:12:46 PM 0 2.50 0.00 4.00 0.00 93.50
03:12:46 PM 1 2.50 0.00 6.00 0.00 91.50
03:12:46 PM 2 2.50 0.00 4.50 0.00 93.00
03:12:46 PM 3 98.51 0.00 1.49 0.00 0.00
03:12:46 PM CPU %user %nice %system %iowait %idle
03:12:48 PM all 25.88 0.00 0.25 0.00 73.88
03:12:48 PM 0 3.00 0.00 0.50 0.00 96.50
03:12:48 PM 1 0.50 0.00 0.00 0.00 99.50
03:12:48 PM 2 0.50 0.00 0.00 0.00 99.50
03:12:48 PM 3 99.50 0.00 0.50 0.00 0.00
03:12:48 PM CPU %user %nice %system %iowait %idle
03:12:50 PM all 25.47 0.00 0.75 0.00 73.78
03:12:50 PM 0 2.49 0.00 1.49 0.50 95.52
03:12:50 PM 1 0.50 0.00 0.00 0.00 99.50
03:12:50 PM 2 0.00 0.00 0.00 0.00 100.00
03:12:50 PM 3 98.51 0.00 1.49 0.00 0.00
Looking at iowait i don't think anythings happening, right?
Please help with some pointers. I have restarted the process thrice now.
Thank You.
[Updated on: Sun, 07 October 2007 15:15] Report message to a moderator
|
|
|
|
Re: delete statement taking long time [message #272815 is a reply to message #272813] |
Sun, 07 October 2007 15:28 |
el33t
Messages: 29 Registered: October 2007
|
Junior Member |
|
|
hi,
thanks for reply...i'm reading the link you have provided..
this is the first time i'm deleting so many records on this database. I tried passing rownum <=10000 and it completes in 15 minutes.
as a quick thing may you please tell me how do i monitor the progress of DML statement?
thanks!
|
|
|
|
|
Re: delete statement taking long time [message #272818 is a reply to message #272817] |
Sun, 07 October 2007 15:43 |
el33t
Messages: 29 Registered: October 2007
|
Junior Member |
|
|
Hello,
Thanks for the input.
Output of the query:
SID BLOCK_GETS CONSISTENT_GETS PHYSICAL_READS BLOCK_CHANGES
---------- ---------- --------------- -------------- -------------
CONSISTENT_CHANGES
------------------
421 563474190 261165091 21822 1979465
0
SQL> SELECT * FROM V$SESS_IO WHERE SID = 421;
SID BLOCK_GETS CONSISTENT_GETS PHYSICAL_READS BLOCK_CHANGES
---------- ---------- --------------- -------------- -------------
CONSISTENT_CHANGES
------------------
421 564172508 261490308 21857 1981928
0
SQL> SELECT * FROM V$SESS_IO WHERE SID = 421;
SID BLOCK_GETS CONSISTENT_GETS PHYSICAL_READS BLOCK_CHANGES
---------- ---------- --------------- -------------- -------------
CONSISTENT_CHANGES
------------------
421 565453641 262087215 21912 1986440
0
|
|
|
|
|
|