Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: Perl DBI to MySQL LOAD_FILE

by Marshall (Canon)
on Jan 05, 2017 at 03:46 UTC ( [id://1178975]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl DBI to MySQL LOAD_FILE
in thread Perl DBI to MySQL LOAD_FILE

Yes, doing the prepare once will increase performance quite a bit.
Another thing that can make a HUGE difference in performance is running all of the updates (or insertions) as a single transaction. From one of my DB creation programs (million records). I like to make the "work" as a sub framed by BEGIN and COMMIT to make the transaction scope clear:
$dbh->do("BEGIN"); #a single transaction makes this MUCH faster import_data(); $dbh->do("COMMIT");

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found