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: Why does a simple delete takes 12 hours and longer ?

RE: Why does a simple delete takes 12 hours and longer ?

From: <William_Dong_at_gelco.com>
Date: Fri, 28 Jul 2000 13:56:28 -0500
Message-Id: <10572.113276@fatcity.com>


Yesterday evening I started the following delete:

delete from ojs_main_multiple where docnum not in (select docnum from ojs_main);

ojs_main contains about 250.000 rows and ojs_main_multiple about 300.000 rows.
docnum is a unique primary key of ojs_main. This morning after about 12 hours
the delete was still running. Any idea why this happens ? Should I believe in "In Oracle we trust "?

I think this is a interesting case. Had i have the tables, I will try rewrite the sql and test it. Can you try the following sql to see if it works better?

DELETE FROM ojs_main_multiple

                  WHERE docnum IN
                                                        (select omm.docnum from
ojs_main_multiple omm, ojs_main om
                                                          where omm.docnum

<>om.docnum);

Your db should use cost insted of rule to run this. See what happens. Received on Fri Jul 28 2000 - 13:56:28 CDT

Original text of this message

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