I have a query that deletes rows from a table with 57K rows, as follows

delete from T1 where not exists
(select T2.PK from T2
where T2.PK = T1.F1);

T2.PK is the Primary Key on Table T2
T1.F1 is an indexed field on table T1

Explain plan shows a low cost (80) but the delete takes about 10+ minutes.
T1 has about 57K rows
T2 has about 29500 rows

other queries with costs in the 700 range are pretty quick - this one's a
dog

any ideas?

thanks

Bill Magaliff
Framework, Inc.
914-631-2322

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Magaliff, Bill
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to