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

> 
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch 
today. 
    Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to