Hello all.

I've just had a look at my log files, especially myslow.log and logger_myslow.log.

Here's the kind of things I can see in logger_myslow.log :
Code:
# Time: 080221 16:13:23
# User@Host: zimbra[zimbra] @ localhost []
# Query_time: 1  Lock_time: 0  Rows_sent: 2  Rows_examined: 66796
select distinct(device) from disk_aggregate where period='day' and host='server.domain.tld';
# Time: 080221 16:13:26
# User@Host: zimbra[zimbra] @ localhost []
# Query_time: 3  Lock_time: 0  Rows_sent: 60  Rows_examined: 33457
select * from disk_aggregate where period='day' and host='server.domain.tld' and device='/dev/mapper/VolGroup00-LogVol00' order by period_end desc limit 60;
# Time: 080221 16:13:30
# User@Host: zimbra[zimbra] @ localhost []
# Query_time: 1  Lock_time: 0  Rows_sent: 2  Rows_examined: 66796
select distinct(device) from disk_aggregate where period='day' and host='server.domain.tld';
# Time: 080221 16:13:37
# User@Host: zimbra[zimbra] @ localhost []
# Query_time: 3  Lock_time: 0  Rows_sent: 365  Rows_examined: 33762
select * from disk_aggregate where period='day' and host='server.domain.tld' and device='/dev/ida/c1d0p1' order by period_end desc limit 365;
I know 1 and/or 3 seconds is not _that_ slow...

But wouldn't it be smart to add a couple of indexes in these tables ?