in reply to processing huge files
I have no idea if this is the actual problem that you are seeing, but long series of inserts are very, very bad for most databases.
If you already have indexes on the table, then every single insert had to modify the table, and the indexes. If you have constraints, then they need to be checked for every record.
If the process can be done completely through the database's builtin loading program (mysql's LOAD DATA syntax, Oracle's SQL*Loader, etc.), then use it directly. This will defer the modifications to the indexes until after everything has completed, and other optimizations for bulk changes.
If the data needs some sort of cleaning before insertion, then I would recommend cleaning the values, and then writing back out a text file ... then using the database's loading utility to slurp in the processed file.
|
|---|