Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DELETE statement performance problem
mike2322_at_hotmail.com (Mike Liu) wrote in message news:<2262aa8e.0202220723.61670a81_at_posting.google.com>...
> Just a guess. If the address_id is referenced by some foreign keys in
> other tables and the index is missing on some of those foreign keys
> column, deleting from address table will cause full table scans on the
> child tables. It might be the reason why delete is running slow. I
> guess when you tried update, you were not updating the address_id
> column.
>
> hth,
> Mike
Mike,
THANKS A LOT !!!!! That really what was my problem in !!!
we have FK in couple of another tables and they were not indexed. After I indexed them - DELETE completes in 0.3-0.5 sec ! I'm so happy :)))
And you were right - when I did UPDATE, i didn't update address_id.
And when I tryed :
UPDATE address
set address_id = 12346
where address_id = 12345
I also got 5-6 sec.
But now, after indexing all FK, everything starts to work just fine.
Thanks a lot again.
Tanya.
Received on Fri Feb 22 2002 - 14:25:09 CST