New installation of 4.0.13 - performance problem viewing tickets

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.

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?

Thanks,
Richard

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 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?

DBD::Pg is version 2.19.3.

Hi Kevin,

Any other thoughts on this?

Thanks,
Richard

 > 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?

DBD::Pg is version 2.19.3.

That’s new enough to no longer generate incorrect SQL, but RT doesn’t
use the DBIx::SearchBuilder functions that call column_info except
during upgrades. As a result, I’m unsure what in RT would be
triggering the queries you’re seeing.

You might turn on RT or Postgres’ query logging and see if you can
figure out what happens before those queries. Also - be suspicious of
any customizations.

-kevin