in reply to Optimize DB update

Faster than what? Could you give some more information?

What hardware (esp. disk system) is used? What database system? Are the changes really UPDATEs, or INSERTs? (maybe bulk loads are feasible? See also this node about batch loads ).

Often, it helps to run many inserts/updates in a single transaction.

Replies are listed 'Best First'.
Re^2: Optimize DB update
by demophoon88 (Initiate) on Jan 27, 2010 at 15:51 UTC
    Sorry for lack of details. The database we're using is mssql. im using perl script that runs through command prompt. actually we are updating 2 databases(no inserts and it would be 400 to 500 thousand rows per database). at each database we are updating 2 tables. im also using 3 queries(2 updates and 1 select for querying a third table). the pc's running on windows 2003 server,2.0ghz and 4gb of ram. the main process of the script is that it loads a csv file(products) and updates the existing data on the database(price,stocks, etc..)