Re: dum query plan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jonathan Moore <moore(at)discern(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: dum query plan
Date: 2003-04-17 03:15:31
Message-ID: 2843.1050549331@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jonathan Moore <moore(at)discern(dot)com> writes:
> I am wondering why it uses the O(n^2) nested loop when there is a O(N)
> methoud using btree indexes for a merg join.

With an inequality for the WHERE condition? I don't think so. The
expected output is of size O(N^2), so how could the algorithm take
less than O(N^2) steps?

> dblex=> explain select A.left_entry from entry_pairs A, entry_pairs B
> where A.right_entry != B.left_entry;

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-04-17 03:20:50 Re: the RAID question, again
Previous Message Nikolaus Dilger 2003-04-17 02:32:54 Re: the RAID question, again