Re: Damn slow query - Mailing list pgsql-hackers

From Joe Conway
Subject Re: Damn slow query
Date
Msg-id 3DA4B195.9020503@joeconway.com
Whole thread Raw
In response to Re: Damn slow query  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Magnus Naeslund(f) wrote:
> One thing to note here is that the JOIN query that Joe suggested is both
> faster than the subselect thing (no suprise) but also don't care if
> z2test has an index on it or not.

It's worth noting though that JOIN is not always the fastest method. I've 
found situations where NOT EXISTS was significantly faster than the LEFT JOIN 
method (although both are usually orders of magnatude faster than NOT IN).

Joe



pgsql-hackers by date:

Previous
From: "Magnus Naeslund(f)"
Date:
Subject: Re: Damn slow query
Next
From: 韩近强
Date:
Subject: inquiry about multi-row resultset in functions