Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> sql statement using full table scan ... HELP
Hi, I need to execute a delete statement and the following will perform
table scans. Any suggestions where I can re-write this? I've tried both
and they have taken forever to run. Activities table has about 1,000,000
records and stars has 10,000.
Thanks,
Dave
copy of the plan table ...
DELETE FROM ACTIVITIES WHERE EXISTS (SELECT ENTITY_ID FROM STARS WHERE
STARS.ENTITY_ID = ACTIVITIES.CONTACT_ENTITY_ID);
DELETE STATEMENT
FILTER
TABLE ACCESS FULL ACTIVITIES
INDEX UNIQUE SCAN ENTITY_ID
delete from activities where contact_entity_id in (select entity_id from
stars);
DELETE STATEMENT
NESTED LOOPS
TABLE ACCESS FULL ACTIVITIES
INDEX UNIQUE SCAN ENTITY_ID
-**** Posted from Supernews, Discussions Start Here(tm) ****-
http://www.supernews.com/ - Host to the the World's Discussions & Usenet
Received on Wed Dec 02 1998 - 08:54:26 CST
![]() |
![]() |