| From: | Greg Stark <gsstark(at)mit(dot)edu> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Rafael Martinez Guerrero <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Help with optimizing a sql statement |
| Date: | 2006-02-10 06:05:42 |
| Message-ID: | 87zmkz6955.fsf@stark.xeocode.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Are you sure this WHERE clause really expresses your intent? It seems
> awfully oddly constructed. Removing the redundant parens and clarifying
> the layout, I get
...
> That next-to-last major AND clause seems a rather unholy mix of join and
> restriction clauses; I wonder if it's not buggy in itself.
FYI RT uses a perl module called SearchBuilder which constructs these queries
dynamically. So he's probably not really free to fiddle with the query all he
wants.
At the very least I would suggest checking the changelog for SearchBuilder for
more recent versions. There have been a lot of tweaks for working with
Postgres. In the past it really only worked properly with MySQL.
--
greg
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Aaron Turner | 2006-02-10 08:16:49 | 10+hrs vs 15min because of just one index |
| Previous Message | Vivek Khera | 2006-02-10 02:28:53 | Re: Help with optimizing a sql statement |