Re: dum query plan
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jonathan Moore <moore@discern.com>
Cc: pgsql-performance@postgresql.org
Date: 2003-04-17T03:15:31Z
Lists: pgsql-performance
Jonathan Moore <moore@discern.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