Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Delete whole table in one go versus batches
"Norman Dunbar" <Norman.Dunbar_at_lfs.co.uk> wrote in message
news:E2F6A70FE45242488C865C3BC1245DA70287E31D_at_lnewton.leeds.lfs.co.uk...
> Ender,
>
> Richard's advice is, as ever, excellent. However, in his haste to return
> the the CD player to listen top yet another David Bowie CD, he neglected
> to add one final stage to the procedures. I attach it here for
> completeness :
>
> if your DBA refuses to truncate table for you, simply say "ah well, I
> better go 'DELETE FROM ,table>' but if I'm not sure, I might do a
> rollback when It finishes" - and that will take almost as long. :o)
> How to wind up a DBA in one easy lesson.
>
> Enjoy :o)
Though it won't work in Ender's case you forgot the more general advice to issue LOCK TABLE ... EXCLUSIVE at the start of the transaction just in case :-( - not to mention the need to set the process running and go off to a meeting where you are uncontactable before you get to the commit/rollback stage.
-- Niall Litchfield Oracle DBA Audit Commission UK ***************************************** Please include version and platform and SQL where applicable It makes life easier and increases the likelihood of a good answer ****************************************** still regretting the absence of kill user <blah>; in the SQL language.Received on Tue Aug 20 2002 - 05:01:27 CDT