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