Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: delete takes too long
Thomas Kyte wrote:
> >Hi,
> >
> >I have a problem with a delete taking a really long time.
> >
> >here is the situation:
> >
> >three tables linked with foreign key constraints
> >
> >lbk_trip
> > |
> > ---< lbk_tow
> > |
> > -----< lbk_catch
> >
> >
>
> have you used timed_statistics and sql_trace and tkprof to see whats really
> happening?
>
Have done it now, and found the problem. Thanks
> do you have your foreign keys indexed?
Well I thought I did, but then there was this 4th table I had completely forgotten about (blush), that had a foreign key constraint to lbk_trip, which wasn't indexed. Cascading the deletes to that table took 97% of the cpu time. (after adding the index it just took a minute instead of 49 minutes)
Oh well, Thanks for the hints and that nifty script
Christian Received on Wed Mar 10 1999 - 13:41:47 CST
![]() |
![]() |