Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: optimizing in delete-statement
Ralf Beutler wrote:
> DA Morgan schrieb unter anderem:
> > Ralf Beutler wrote:
> >
> >> DA Morgan wrote:
> >>
> >> > My guess is that you have multiple things wrong. Start with an EXPLAIN PLAN.
> >> > .. post the plans.
> >>
> >> DELETE STATEMENT ()
> >> DELETE () TROUTE
> >> NESTED LOOPS ()
> >> VIEW () VW_NSO_1
> >> SORT (UNIQUE)
> >> TABLE ACCESS (BY INDEX RO TUSERXORGANIZER
> >> INDEX (RANGE SCAN) I_TUSERXORG_FKUSERID
> >> INDEX (UNIQUE SCAN) SYS_C001926
> >>
> >> I can't see something wrong.
> >>
> >
> > This is taking 30 seconds on 58,000 rows? Hmmm.
> >
> > Is it 58,000 rows in the table or 58,000 rows that are being deleted? What is the
> > breakdown between total rows and deleted rows?
>
>
>
>
>
You definitely have a problem but it isn't your SQL statement. Something is causing a huge wait. I ran your statement on a test table with 100K rows deleting 3 with indexes on a 500MHz PIII with 512MB RAM on my notebook. It took far less than one second.
Look at the various data dictionary views that hold wait information and see what is there. Also I notice that your EXPLAIN PLAN listing didn't contain the cost. What is it?
Daniel Morgan Received on Tue Feb 11 2003 - 14:18:17 CST