Optimizing a high insert/select/delete table
I have a transaction log table that basically is inserting, reading, and writing new records many times a second.
It has about 5 rows with various ids in them. Aside from indexes/query modifications, is there anything specific to optimize a table like this? It's a开发者_开发百科 MyISAM table type.
Thanks!
I would first change the table to InnoDB as it will not lock the entire table for your inserts and deletes. Other than that, indexes are really going to make or break the speed of this table.
Review the queries you do against a table. Are you effectively using the indexes to select and update the data? Also, consider which of the queries are more straining on the Table. If you are write heavy (which I am guessing) you may want to remove an index or two. If you are read heavy, possibly add another.
It is hard to say without knowing the specific table and circumstances. Also, I found that write speed increases when using fixed length (char, int, binary) columns instead of variable length columns (varchar, varbinary, Text)
精彩评论