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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RE: tuning a massive delete

RE: RE: tuning a massive delete

From: Kevin Toepke <ktoepke_at_rlcarriers.com>
Date: Wed, 17 Sep 2003 08:54:43 -0800
Message-ID: <F001.005D03C1.20030917085443@fatcity.com>


When tuning queries, ignore the fact that explain plan shows a cost. The optimizer finds the lowest cost it can. If you mess with hints you will almost certainly get a higher cost. I've tuned queries that ran for hours with a cost of less than 10 -- the tuned versions had costs in the hundred-billions and ran in seconds.

Secondly, you can alter session your hash_area_size up and noone will be the wiser.

Kevin

-----Original Message-----
Sent: Wednesday, September 17, 2003 12:25 PM To: Multiple recipients of list ORACLE-L

i explain planned it and it was much worse than not exists.

my understanding is hash_aj is faster when the table in the sub-query returns results that are significantly less than the one in the outer table.

ill try it, but i think exists is faster. we dont want to do an index scan here and my hash_area_size isnt real big.
>
> From: "Richard Ji" <Richard.Ji_at_ztango.com>
> Date: 2003/09/17 Wed PM 12:04:56 EDT
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Subject: RE: tuning a massive delete
>
> Try anti hash join.
>
> -----Original Message-----
> Sent: Wednesday, September 17, 2003 11:45 AM
> To: Multiple recipients of list ORACLE-L
>
>
> i have a table with 27 million records that is about 1.2 GB in size. I
have a 'staging table' with 18 million records. 16 million records have a 'delete' flag. I have indexed the column in staging with a delete flag. both tables have indexed primary keys. Is the following my fastest option or would an 'IN' be faster? Im concerned because this has been running for a while and have alot of consistent gets but no 'writes' yet which tells me its still building the join. Our sort_area_size is rather small and Im not allowed to change it which tells me we are swapping to the temp tablespace.
>
> anyway to speed this up? or is this the fastest we got?
>
>
> create table ani_prx_new parallel (degree 5) nologging
> as select *
> from ani_prx b
> where not exists (select 1 from bo_owner_stage.ani_prx a where ba_reccode
= 'V' and a.cusip = b.cusip
> and a.fund_no = b.fund_no and a.add_cymd = b.add_cymd)
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: <rgaffuri_at_cox.net
> INET: rgaffuri_at_cox.net
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (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).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Richard Ji
> INET: Richard.Ji_at_ztango.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (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).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: <rgaffuri_at_cox.net
  INET: rgaffuri_at_cox.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Kevin Toepke
  INET: ktoepke_at_rlcarriers.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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).
Received on Wed Sep 17 2003 - 11:54:43 CDT

Original text of this message

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