in reply to When to use forks, when to use threads ...?
For a mass insertion into a database I would recommend neither approach. Instead I would suggest learning what native tools your database has for mass inserts. I would then use them. If the table you're inserting into has indexes I would strongly suggest dropping all indexes, doing the insert, then re-creating the indexes. (The reason for that is that maintaining indexes during inserts results in a lot of random seeks to disk. Seeking to disk is expensive. Throwing away the index and rebuilding it at the end avoids most of those seeks and is therefore much faster.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: When to use forks, when to use threads ...?
by Krambambuli (Curate) on Sep 05, 2008 at 07:42 UTC | |
by perrin (Chancellor) on Sep 05, 2008 at 11:17 UTC | |
by tilly (Archbishop) on Sep 05, 2008 at 11:40 UTC |