Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Database input speed question

by Abigail-II (Bishop)
on Jul 31, 2003 at 15:21 UTC ( [id://279610]=note: print w/replies, xml ) Need Help??


in reply to Database input speed question

Many database support some form of bulk insert, like Sybase's bcp utility (and corresponding library). That should be the fastest way of doing multiple inserts. Your database might not support doing a bulk insert into a non-empty table - in that case, insert the stuff into a temporary table, and use a stored procedure to move the stuff from the temporary table into the final table.

Also, if you have indices on the table, drop the indices, do the insert, and create the indices again. Dropping and recreating insert triggers could also be a huge gain, but you have to make sure it's safe to drop the trigger.

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://279610]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found