[Rt-devel] SQL/DBI caching

Alex Pilosov alex at pilosoft.com
Sun Jul 5 16:36:09 EDT 2009

I'm not sure if anyone has brought this up before, but I haven't found 
anything on the lists.

I'm seeing that RT makes very very large number of SQL queries even to
process a minimal page. To display a single ticket, I'm seeing *120*
queries to the database in a very basic RT install. Most of them are very
much repetitive - ACL, Atrtibutes, Users, Groups, Principals.

That's broken. 120 queries means a minimum of 120 round trips to the 
database. Even at 10ms per query, that's 1.2 seconds.

I see that there's some support in DBIx::SearchBuilder for cacheable 
records - but nevertheless, I see certain things repeatedly fetched.

Is this a known problem? 

I've hacked up enough things for DBD::Gofer caching support - and my 
display times went from 1s to .3s. Of course, this is not the right 
solution - DBIx::SearchBuilder should be more efficient in caching.


More information about the Rt-devel mailing list