http://qs321.pair.com?node_id=762053


in reply to Re: Batch INSERT performance
in thread Batch INSERT performance

The database is Mysql.

The LOAD DATA seems to use files, and I have no intention of writing files to do the data import. I do admit I did not know about the LOAD DATA option though, I might use it for something else.

However, would placeholders be problematic for a large data import?

Replies are listed 'Best First'.
Re^3: Batch INSERT performance
by roboticus (Chancellor) on May 05, 2009 at 21:06 UTC
    Herkum:

    You might not want to be so quick to dismiss the idea. I'm not knowledgeable about Mysql, but for MS SQL, Sybase and Oracle, the fastest way you can load data into a table is to bulk load it in from a flat file. And we're not talking about a five percent increase in speed--it's normally an order of magnitude faster.

    ...roboticus
Re^3: Batch INSERT performance
by samtregar (Abbot) on May 07, 2009 at 15:25 UTC
    Placeholders should work fine. I've used placeholders for statements with tens of thousands of parameters.

    -sam