[rt-users] RT related Postgres question
Jesse Vincent
jesse at bestpractical.com
Fri Nov 30 14:26:04 EST 2007
>
> -> Seq Scan on tickets main (cost=0.00..17539.97 rows=1485 width=168)
> (actual time=0.040..846.740 rows=298633 loops=1)
> Filter: ((((status)::text = 'open'::text) OR ((status)::text =
> 'new'::text) OR ((status)::text = 'stalled'::text) OR ((status)::text =
> 'resolved'::text)) AND (("type")::text = 'ticket'::text) AND
> (effectiveid = id))
>
> If however I remove the "main.EffectiveId=main.id" chunk of the query it
> uses a far more efficient query. Only a very small proportion of our
> tickets are merged
>
> Anybody here seen this and/or know where to start looking for how to
> correct this? I have run "VACUUM FULL ANALYZE" and tried playing with
> the statistics on Tickets but to no avail.
That sequential scan looks funny. I suspect you really want an index on
it.
>
More information about the rt-users
mailing list