[rt-users] How to avoid a huge dataset returning

Kevin Falcone falcone at bestpractical.com
Fri Sep 16 14:36:02 EDT 2011


On Fri, Sep 16, 2011 at 02:31:37PM -0400, Jay Ashworth wrote:
> ----- Original Message -----
> > From: "Kevin Falcone" <falcone at bestpractical.com>
> 
> > That doesn't looks like a standard RT query, but you haven't provided
> > your version. You'll probably want to turn on the StatementLog option
> > and figure out where that query is coming from so you can fix the
> > source.
> 
> Which makes you a good person for me to bounce a SQL idea off of:
> 
> For the purpose of tracing queries back into code, how about something like:
> "add to the end of each query a clause like AND NOT Todays_Date = '1000-08-22'
> (using the appropriate SQL syntax, which I forget)... using the date as an
> 'address' for the query in the code (program, module, query, or something 
> similar."
> 
> The entire clause will be statically true, and get optimized off, but will
> still show up in the slow-query log, and in mytop/mtop, etc... giving you 
> a handle to get back to the code.
> 
> Is this possible?  Practical?

This destroys mysql's query cache, which is a very nice performance win.  

On RT4 you can enable the statement log and see every query run
on a page with pointers into the source that executed it.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110916/1514d2ab/attachment.sig>


More information about the rt-users mailing list