Thanks Tom and Michael,

I got rid of all of the indexes except the one marked "PRIMARY" and a new one that I made like this:

ALTER TABLE logs ADD unique (host,date,time,priority,facility,seq);

I see quite an improvement from what I was seeing before. The one thing that I didn't realize is that the optimizer will only use one key. I also didn't realize that if I make an index on multiple keys that I could use that index to select when I was searching without all keys present (probably should have realized that). I still can't get rid of "Using filesort" but it doesn't seem to bee too big of a performance hit. I will try to re-read the docs again when I return next week.

I also rewrote the queries that used HOUR(date) to something that doesn't include a function.

Sometimes reading the docs isn't enough ;-)

Thanks again for your help,

BMG


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to