The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 08-09-2005
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,960
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.