From: | Christopher Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: does postgresql execute unions in parallel? |
Date: | 2003-09-26 20:28:23 |
Message-ID: | 604qyz2t20.fsf@dev6.int.libertyrms.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
mendola(at)bigfoot(dot)com (Gaetano Mendola) writes:
> teknokrat wrote:
>> If I have several selects joined with unions does postgresql
>> execute the concurrently or not?
>
> nope.
I was talking with Jan about that very idea yesterday; this would seem
to be the place where PostgreSQL might take some (possibly even nearly
magical :-)) benefit from threading.
The usual way that people expect to use threading is for each
connection to have a thread.
If, instead, every _join_ had a thread, that would allow producers of
data to look for their data quasi-independently, passing result sets
upwards towards the return set to whatever thread was waiting to
consume the data.
This would allow one complex query to take over a whole horde of
processors :-).
The "magic" part would be if the system decided, "The SEQ SCAN on the
table I'm looking at is a big one; let's split it into 4 chunks, doing
a virtual UNION ALL, and thereby filter bits of it in parallel on 4
CPUs." That would provide many of the benefits Informix claimed from
"fragmentation" without having to fragment the table :-).
--
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://www3.sympatico.ca/cbbrowne/lsf.html
Rules of the Evil Overlord #187. "I will not hold lavish banquets in
the middle of a famine. The good PR among the guests doesn't make up
for the bad PR among the masses." <http://www.eviloverlord.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-09-26 22:47:47 | Re: [HACKERS] plpgsql doesn't coerce boolean expressions to boolean |
Previous Message | Gaetano Mendola | 2003-09-26 19:58:59 | Re: does postgresql execute unions in parallel? |