Tom Lane <tgl@xxxxxxxxxxxxx> wrote: > Wayne Conrad <wconrad@xxxxxxxxx> writes: >> Total runtime: 244572.432 ms > I'll take a look at fixing that, but not sure if it'll be > reasonable to back-patch or not. In the meantime, you need to > look into restructuring the query to avoid nesting the EXISTS > probes, if possible. Wayne, I think your best bet at this point may be to just (INNER) JOIN the three tables, and if there is a possibility of duplicates to use SELECT DISTINCT. -Kevin -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance