Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> sql statement using full table scan ... HELP

sql statement using full table scan ... HELP

From: David Nguyen <david.nguyen_at_tonystone.com>
Date: Wed, 02 Dec 1998 06:54:26 -0800
Message-ID: <Cwc92.137$n4.487834@WReNphoon2>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US