From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Lowery <bruce.lowery@edventions.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] uncorrelated subqueries
Date: Sun, 11 Jul 1999 17:37:03 +0300
Message-ID: <l03130305b3ae5b9cac2f@[147.233.159.109]> (raw)
In-Reply-To: <461.931462206@sss.pgh.pa.us>
References: <37859FE1.D1D95558@edventions.com>
At 22:30 +0300 on 08/07/1999, Tom Lane wrote:
> The main problem that would have to be solved to convert this to
> an InitPlan is what to do if the subselect returns a huge number
> of tuples ... with the current implementation, since we scan the
> tuples one at a time, there's no problem, but if we try to store
> all the tuples we could run out of memory.
How about putting them in a temporary table if the number of returned
tuples is big? Although the scan on the temp table will be sequential, it's
still not the same as scanning the original table (checking conditions and
perhaps even joining). If the internal query is ran on a 3 million record
table, and returns a million of them, it's worthwhile storing in a temp
table.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
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-sql@postgresql.org
Cc: herouth@oumail.openu.ac.il, tgl@sss.pgh.pa.us, bruce.lowery@edventions.com
Subject: Re: [SQL] uncorrelated subqueries
In-Reply-To: <l03130305b3ae5b9cac2f@[147.233.159.109]>
References: <37859FE1.D1D95558@edventions.com> <l03130305b3ae5b9cac2f@[147.233.159.109]>
* 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