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 -> Re: help: query tuning

Re: help: query tuning

From: Mark G <someone_at_hot>
Date: Mon, 12 Jul 1999 15:24:28 +0100
Message-ID: <3789f86b.0@145.227.194.253>


Help? I'll tell you how you can help your code. Put an index on at least table_b!
Why can't you create an index? Beg to have an index put on it.

The only slightly faster way to delete your rows is to create some pl/sql and cursors to loop through one of your tables and to check against the other. If it exists, delete the row and commit inside the loop (to stop rollback segments going bananas).

Mark

ewong74_at_netscape.net wrote in message <7m60pg$o6a$1_at_nnrp1.deja.com>...
>Hi,
>
>I have the following query which take me 2 hour to finish:
>
>delete from table_a a where term_id in
>(select term_id from table_b b where a.code = b.code);
>
>table_a has 300k rows, table_b has 100k rows.
>Both tables have no indexes and i cannot create any indexes on them.
>When I do an explain plan, it looks like oracle are doing full table
>scan for both tables.
>
>Please help. Thanx.
>
>Ed
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Mon Jul 12 1999 - 09:24:28 CDT

Original text of this message

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