At 07:00 AM 1/13/2010, F.A.I.Z.A.L wrote:
where ( ATX_Status.Status like '%running%' or ATX_Status.Status like '%queued%' or ATX_Status.Status like '%migrating%' or ATX_Status.Status like '%loading%' or ATX_Status.Status like '%configuring%' or ATX_Status.Status like '%activating%' )
It looks like it is doing a full table scan on ATX_Status because you have started the comparison value with '%....'. It would be faster if you could do an exact match. Try replacing this "( )" part of the Where clause with just " (ATX_Status.Status = 'xxxx')"
where xxxx is a valid status like 'running'. Also do an Explain on your SQL statement to see which indexes it is using. You need to simplify the SQL statement until it starts running fast again to see what is causing the slow down. Perhaps rebuild the query with one table join at a time.
Remember to run a "Reset Query Cache" between benchmarks to eliminate the query cache.
Mike
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org