I use RT 3.8.2<br><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 6:02 PM, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">On Fri, Sep 16, 2011 at 05:08:24PM +0300, Michael Stepanov wrote:<br>
> Hi,<br>
><br>
> Our RT3 system is a big and it crashes time to time. Today we found one<br>
> query in the slow queries log which killed the system:<br>
> *<br>
> # Query_time: 97  Lock_time: 0  Rows_sent: 15906633  Rows_examined: 39069181<br>
> SELECT main.* FROM Transactions main  WHERE (main.Type = 'Create' OR<br>
> main.Type = 'Comment' OR main.Type = 'Correspond')  ORDER BY main.Created<br>
> ASC, <a href="http://main.id" target="_blank">main.id</a> ASC;<br>
> *<br>
> Is there a way to reduce a number of returning records on the application<br>
> level?<br>
<br>
</div></div>That doesn't looks like a standard RT query, but you haven't provided<br>
your version.  You'll probably want to turn on the StatementLog option<br>
and figure out where that query is coming from so you can fix the<br>
source.<br>
<font color="#888888"><br>
-kevin<br>
</font><br>--------<br>
RT Training Sessions (<a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a>)<br>
*  Chicago, IL, USA — September 26 & 27, 2011<br>
*  San Francisco, CA, USA — October 18 & 19, 2011<br>
*  Washington DC, USA — October 31 & November 1, 2011<br>
*  Melbourne VIC, Australia — November 28 & 29, 2011<br>
*  Barcelona, Spain — November 28 & 29, 2011<br></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br>Michael<br>