[rt-devel] 3.0.8 and redundant queries

Kevin Murphy murphy at genome.chop.edu
Thu Jan 29 15:47:44 EST 2004


Hi, 3 things:

1) Like a couple of other people, with 3.0.8 I now see 'RT_System' 
being the owner of some new tickets instead of nobody.

2) 3.0.8 seems a bit slower to me, but I changed a lot at the same 
time.  I went from perl 5.8.0 to 5.8.3, DBIx::SearchBuilder .95 -> .96, 
RT 3.0.7 to 3.0.8, and Apache 1.3.28 to 1.3.29, mod_perl from 1.28 to 
1.29, and obviously many perl module upgrades.

3) This has been mentioned before, but why does RT issue the query 
"SELECT * FROM Principals WHERE PrincipalType ILIKE  'Users' AND 
ObjectId =  'X'" so often?  (I'm using PG).  In a search for all new or 
open tickets in a queue, the following query forms have instances that 
get executed more than once, i.e. the results are not cached on the RT 
side (but I guess sometimes they cannot be ...)

murphy at kevin$ perl ~/cvs/egenome/src/scripts/analyze_pg_log.pl 
--sort_by_dupes --params egweb_query.log

There are 21 unique basic queries:
Label   Count   Uniques TotalTime       Avg-Time        Query
-----   -----   ------- ---------       --------        -----
# 14 non-redundant queries, then
O       3       2       0.001112        0.000371        SELECT * FROM 
Users WHERE Name ILIKE  ?String-1?
                                         ('Nobody') x 1
                                         ('RT_System') x 2
P       2       1       0.005790        0.002895        SELECT * FROM 
Groups WHERE Type ILIKE  ?String-1? AND Domain ILIKE  ?String-2?
                                         ('Privileged', 
'SystemInternal') x 2
Q       2       1       0.000553        0.000276        SET TIME ZONE 
?String-1?
                                         ('GMT') x 2
R       2       1       0.001109        0.000554        SELECT * FROM 
Queues WHERE Name ILIKE  ?String-1?
                                         ('eg-web') x 2
S       2       1       0.000285        0.000142        SET DATESTYLE 
TO ?String-1?
                                         ('ISO') x 2
T       2       1       0.001375        0.000687        SELECT 
a_session FROM sessions WHERE id =  ?String-1? FOR UPDATE
                                         
('00343fd30896db45cd6029219a19da1c') x 2
U       314     1       0.000882        0.000003        SELECT * FROM 
Principals WHERE PrincipalType ILIKE  ?String-1? AND ObjectId =  
?String-2?
                                         ('User', '22') x 314
----    -----   -----   ---------
Totals: 439             0.082435
Approx. elapsed time of this section of log is 5 seconds.
murphy at kevin$

(Then there's the issue of what is going on for the other 4.9 seconds 
.... ;-)

-Kevin




More information about the Rt-devel mailing list