Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> a quick SQL performance question.
Dear all !
I've got a cursor , which selects approximately 25% of records in a table
(the total number of records in that table is typically 2 to 20 thousands).
For each record ,fetched in that cursor, i need to do some processing , and
then delete that record.
Now, what's faster:
1) Add the rowid to the fields selected inside the cursor, and issue "delete
from MYTAB where rowid = ...." , for each record inside the cursor.
or
2) Leave the cursor intact, and just issue one delete statement afterwards,
which will delete all the records , fetched by the cursor.
This operation is executed every couple of seconds, so i want to maximally
optimize it .
Cheers.
I'd very much appreciate a prompt responce.
Thanks a lot ~
DBAndrey
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Andrey Bronfin INET: andreyb_at_elrontelesoft.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- 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 Thu Jul 18 2002 - 13:38:30 CDT