[rt-users] TicketHistory slow on 4.2.0

Alex Vandiver alexmv at bestpractical.com
Fri Oct 25 16:39:56 EDT 2013


On Thu, 2013-10-24 at 09:55 -0400, Tod Detre wrote:
> I'm learning more and more about mysql and RT trying to track down
> this problem. 8-) I ran mysqldumpslow to try to find queries that are
> showing up a lot and found the queries listed below. However, I'm not
> convinced it is on the sql server as I can cause the problem to
> resurface once it's gone by clearing my browser's cache.

If it is indeed not the database (which would surprise me), you may need
to turn on Mason profiling to determine which components are being slow.
Instructions for doing so are in
http://docs.bestpractical.com/RT_Config#MasonParameters  Note that this
has a performance impact, so you will likely want to test this on a
separate development server.

> Count: 192  Time=7.50s (1439s)  Lock=0.00s (0s)  Rows=1.0 (192),
> rt4[rt4]@xxx.xxx.net
>   SELECT count(main.id) FROM ObjectCustomFieldValues main  WHERE
> (main.Disabled = 'S') AND (main.ObjectId = 'S') AND (main.ObjectType =
> 'S')

The time taken by this query is quite surprising.  Can you show the
query plan for it, by finding one specific example, and running:

EXPLAIN SELECT count(main.id)
   FROM ObjectCustomFieldValues main
  WHERE (main.Disabled = '...')
    AND (main.ObjectId = '...') AND (main.ObjectType = '...');

...replacing the '...'s with real values?  Also, the output of:
   SHOW INDEXES FROM ObjectCustomFieldValues;

 - Alex






More information about the rt-users mailing list