Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> optimizing in delete-statement
Hi,
following statement works very slow:
DELETE FROM tRoute
WHERE RouteId IN ( SELECT ItemId FROM tUserXorganizer WHERE Type = :1 AND FKUserId = :2 )
It performs a full table scan on tRoute.
IMHO that's why it has to search all RouteId's and then have a look at
tUserXOrganizer to find them there.
Is there a better way for deleting on this table without full table
scan? This statement is used in a procedure.
thx
br | rb Received on Fri Feb 07 2003 - 05:55:40 CST