Speedy Summary
Think about the big picture first
- Choice of tools, schema design, partitioning, latency, etc.
Check and tune the access plans for your statements
- Teach your database about any uneven key distributions
Use placeholders - where supported
- Especially for any statements that vary and will be executed often
Replace do() in a loop
- with prepare() and execute()
Sling less data for faster row fetching
- Or sling none per row by binding columns to perl variables
Do more with less by using the DBI in the most efficient way
- Make fewer, better, DBI method calls
Other important things to consider…
- your perl code, plus hardware, operating system, and database configuration etc.