Re: dum query plan - Mailing list pgsql-performance

From Tom Lane
Subject Re: dum query plan
Date
Msg-id 2843.1050549331@sss.pgh.pa.us
Whole thread Raw
In response to dum query plan  (Jonathan Moore <moore@discern.com>)
List 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


pgsql-performance by date:

Previous
From: "Nikolaus Dilger"
Date:
Subject: Re: the RAID question, again
Next
From: Josh Berkus
Date:
Subject: Re: the RAID question, again