[TriLUG] MySQL strangeness

Brian McCullough via TriLUG trilug at trilug.org
Wed Sep 2 10:18:02 EDT 2015


On Wed, Sep 02, 2015 at 09:11:42AM -0400, Shawn Taylor wrote:
> You have a query or many queries that is taking a long time to sort the result set. You need an index or indexes on your table to support the sort, or you need to use a different sort key in the query(ies). Mysql logs all slow queries, if that is turned on you should see the offenders in the slow log. By default, the file is called mysqld_slow.log.

Thank you, Shawn.

Yes, I have encountered the slow log before, but it has been at least a
couple of years.  I don't do much DBA work.

I found it off.  I turned it on for a minute or two, and got 191K of
output before I turned it off again.

Already I see at least one table that is getting a lot of hits and only
has the Primary Key, no extra indexes.


Onward .....


Brian




More information about the TriLUG mailing list