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: It took more than an hour to update 10,000 records

RE: It took more than an hour to update 10,000 records

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Tue, 13 Aug 2002 09:39:58 -0800
Message-ID: <F001.004B3266.20020813093958@fatcity.com>


David,

I think an hour to update 10,000 is way too long.

How are you determining the value's for the 'where' clause? If you are running
10,000 of these update statements, then you are performing it as slow as is possible. You need to look at optimizing the total update into as few sql statements as possible.

One possible method is to create a stored procedure where you pass in all the parameter values and repeatedly call the procedure to perform the updates - this would be faster than what you are currently doing.

Another method would expand on the above depending on how you are getting the values for the 'where' clause - all using single sql statements.

Provide some more info and we can help.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Tuesday, August 13, 2002 12:25 PM
To: Multiple recipients of list ORACLE-L

Hi all,

I write a script to update 10,000 records in my database and noticed it took more than an hour to update 10,000 records. The script just includes 10,000 SQL update commands as shown below. Is the time too long to update 10,000 records? Is it a way to improve the update task to run faster. Please advise.

update dbimpl.npa_nxx set ported_flag = 1 where nxx_id = 206 and npa_id = 201 and lata_id = 224;

update dbimpl.npa_nxx set ported_flag = 1 where nxx_id = 207 and npa_id = 201 and lata_id = 224;

Thanks,
David
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Nguyen, David M
  INET: david.m.nguyen_at_xo.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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
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 Tue Aug 13 2002 - 12:39:58 CDT

Original text of this message

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