Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Improving SQL speed

by doom (Deacon)
on Nov 01, 2009 at 17:59 UTC ( #804372=note: print w/ replies, xml ) Need Help??

in reply to Re: Improving SQL speed
in thread Improving SQL speed

And if ganging up inserts still seems too slow, there's apparently a bulk load command named ".import" that will load a table from a file in one-shot:

The fact that there's a ".seperator" command makes it sound like it's better suited to tsv files than csv, but you'd need to play around with it to see. Most database bulk-loaders seem to work with some version of csv, but frequently you'll need to massage the csv first to get it in the form they expect: csv is a standard without a standard.

Comment on Re^2: Improving SQL speed
Replies are listed 'Best First'.
Re^3: Improving SQL speed
by Mad_Mac (Beadle) on Nov 02, 2009 at 19:05 UTC
    Thanks. I'd had skimmed some other pages that suggested for this type of thing it might be faster to write everything out to a CSV and the do a bulk upload, but I hadn't found a good example of the necessary syntax yet. I'll check out those links.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-11-30 03:49 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (757 votes), past polls