From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jonathan Moore <moore@discern.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: dum query plan
Date: Wed, 16 Apr 2003 23:15:31 -0400
Message-ID: <2843.1050549331@sss.pgh.pa.us> (raw)
In-Reply-To: <1050476308.20872.19.camel@spunge-bob>
References: <1050476308.20872.19.camel@spunge-bob>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, moore@discern.com
Subject: Re: dum query plan
In-Reply-To: <2843.1050549331@sss.pgh.pa.us>
References: <1050476308.20872.19.camel@spunge-bob> <2843.1050549331@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox