Reputation: 2133
What is the best way to avoid the overhead generated by executing many INSERT queries for logging purposes in a PHP/MySQL application? So far I have narrowed the solutions down to:
Not losing log entries is important.
Upvotes: 1
Views: 1504
Reputation: 76641
Use the archive
engine for the log tables.
It's optimized for the workload of keeping a log.
http://dev.mysql.com/doc/refman/5.0/en/archive-storage-engine.html
Note that this engine does not support indexes which speeds up inserts, but slows down selects.
Upvotes: 2