Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Index uasge during delete

141846Dec 18 2001
Hi All,

I have Oracle 8i R2 (aka 8.1.6) and have a quite big table in
it with 40+ million records. I have a plan index created on one
of the columns and now I'd like to delete a few million records
from this table selecting records based on a cryteria which uses
the indexed column but when I check the progress with DBA studio
it says it'll take 18 hours and does a full tablescan instead
using the index.
I tried to give a hint to use the index: DELETE /*+ INDEX_ASC
(<tablename> <indexname>)*/ FROM <tablename> WHERE <column> <
<value>; where column is a number column and the index is created
only on this column.
Why does it do a full scan and how can it be sped up then?

Thanks,

Gabor 'Morc' Kormos.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2002
Added on Dec 18 2001
6 comments
472 views