I'm trying to fine-tune my MySQL server so i check my settings, analyzing slow-query log, simplify my queries if possible.
Sometimes enough if i indexing correctly sometimes not. I've read somewhere (pls correct me if this is stupidity) more indexes than i needed make the same effect like i haven't any of them.
How many indexes are enough? You can say it depends on hundreds of factors but i'm curious about how can i clean up my mysql-slow.log enough to reduce server load.
Furthermore i saw some "interesting" log entries like this:
# Query_time: 0 Lock_time: 0 Rows_sent: 22 Rows_examined: 44
SELECT * FROM `categories` ORDER BY `orderid` ASC;
The table in question contains exactly 22 rows, index set in orderid
. Why showing up this query in the log after all? Why examine 44 rows if it only contains 22?