Sponsored Content
Full Discussion: multiple updates
Top Forums UNIX for Advanced & Expert Users multiple updates Post 80532 by matrixmadhan on Tuesday 9th of August 2005 09:46:37 AM
Old 08-09-2005
Hi All,

got the solution myself but in a different way and it is efficient compared to the one i had thought of doing that.

dbaccess <dbname> -<<EOF
update table1 set col1=1 where col2=1
EOF


Instead of
getting the values
opening the database
performing single update
closing the database

Generate the .sql file which generates all the database statements within one begin and commit statement

and that sql file could be fed to the database as

dbaccess <dbname> <.sql filename>

When the i tried the previous method it took some 25 minutes for 12000 records
and in the later method only 3 minutes.

Any ideas welcome.
 
All times are GMT -4. The time now is 12:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy