On Mon, Jul 29, 2013 at 04:46:25PM +0800, Richard Colley wrote: > I am having a strange performance problem viewing tickets in a recent > installation of RT v4.0.13 on RHEL6.4. DB is Postgres 9.2.
Which version of DBD::Pg are you using? There were problems with column_info on older versions of DBD::Pg when run against Pg 9.2 While RT doesn't directly use that method (outside of upgrades) you may be running into some other issue. You can find your module versions on Tools -> Configuration -> Tools -> System Configuration and searching for DBD::Pg. -kevin > I think the problem is related to SearchBuilder. > > I have only about 20 tickets in the db, and when viewing a ticket, it can > take up to 10+ secs to display the ticket. > > The problem doesn't happen everytime, but when it does, I have hundreds (if > not thousands) of the following query being executed: > > SELECT consrc FROM pg_catalog.pg_constraint WHERE contype = 'c' AND > conrelid = 75880 AND conkey = '{5}' > > each query iwth different conrelid and conkey values. > > A short time ago, I discovered that this problem doesn't *seem* to happen > if I log out and log back in. But if I leave a user logged in overnight, > then re-use the same session, the problem seems to occur. > > Grep'ping through code shows that this statement is in DBD:Pg > column_info(). That doesn't seem to be directly called from RT, but is > part from SearchBuilder. > > I'm afraid that's all I've got to go on for now. Any suggestions on how to > narrow down and eventually remove this issue?
pgpnimdubAtYl.pgp
Description: PGP signature