Re: Damn slow query

From: Joe Conway <mail(at)joeconway(dot)com>
To: "Magnus Naeslund(f)" <mag(at)fbab(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Damn slow query
Date: 2002-10-09 22:45:41
Message-ID: 3DA4B195.9020503@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-10-10 04:00:59 Re: inline newNode()
Previous Message Magnus Naeslund(f) 2002-10-09 22:39:44 Re: Damn slow query