[rt-users] request for feedback on a patch for RT 3.6.4

James Moseley jmoseley at corp.xanadoo.com
Fri Aug 3 12:50:51 EDT 2007

For me, this patch has worked perfectly.  Right after my upgrade to 3.6.4,
I had posted to this list regarding search timeouts when using AdminCC or
CC searches, but got no response.  Eventually, other folks started to have
the same problem and as it turns out, it's only when using the 'OR'
aggregator.  It would have helped to have posted the actual search, I
agree.  Anyway, here's an example search that after four minutes timed out
*before* the patch was applied:

(  Status = 'new' OR Status = 'open' ) AND  (  Cc.Name = 'user' OR
AdminCc.Name = 'user' )

After applying the patch, the same search takes 1 second.  This with a
database of around 14,000 tickets.

James Moseley

             "Ruslan Zakirov"                                              
             <ruz at bestpractica                                             
             l.com>                                                     To 
             Sent by:                  "RT users"                          
             rt-users-bounces@         <rt-users at lists.bestpractical.com>  
             lists.bestpractic                                          cc 
                                       [rt-users] request for feedback on  
             08/03/2007 11:25          a patch for RT 3.6.4                

Hi, brave users of RT 3.6.4.

In the mentioned version of RT I changed SQL queries we generate to
searches tickets by watchers(requestors, cc or admicc). Logic of those
queries is better now. However, I've broken performance of queries
like "Requestor = 'X' OR Owner = 'Y'", "Requestor = X OR Status = 'Y'"
and most probably other where condition on watcher is joined with
another condition using OR aggregator.

We have two ways to fix the problem. I sent one patch already to the
list, but we really need more feedback (positive or negative) to make
right choice, so I post it again.

Please do the following steps to collect feedback I need.
1) build a query (see above) in the query builder using sane values
for your setup
2) execute search and wait for results, we expect it to be very slow,
so you shouldn't wait to much
3) apply the patch
cd /opt/rt3;
cat /path/to/the/patch | patch -p0
4) stop and start web server
5) try search again

Send feedback. People who know how to deal with slow-logs, explain are
more than welcome to send additional info, but even if you don't know
how to deal with those it's ok, just send description of the system
behavior and wallclock timings.

6) revert patch
cat /path/to/the/patch | patch -p0 -R
7) stop and start web server

Best regards, Ruslan.
(See attached file: 3.6-searches_by_watchers_performance_fix.patch)

Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com

Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.6-searches_by_watchers_performance_fix.patch
Type: application/octet-stream
Size: 2158 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070803/c337492e/attachment.obj>

More information about the rt-users mailing list