From: Christopher Browne <cbbrowne@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Perfomance Tuning
Date: Wed, 13 Aug 2003 15:07:04 -0400
Message-ID: <60r83ptm07.fsf@dev6.int.libertyrms.info> (raw)
References: <Pine.BSF.4.44.0308130945160.15110-100000@torgo.978.org>
<200308130846.55991.josh@agliodbs.com>
josh@agliodbs.com (Josh Berkus) writes:
>> The other advantage (which I hinted to above) with raw disks is being able
>> to optimize queries to take advantage of it. Informix is multithreaded
>> and it will spawn off multiple "readers" to do say, a seq scan (and merge
>> the results at the end).
>
> I like this idea. Has it ever been discussed for PostgreSQL? Hmmm
> .... we'd need to see some tests demonstrating that this approach
> was still a technical advantage given the improvements in RAID and
> FS technology since Informix was designed.
Ah, but this approach isn't so much an I/O optimization as it is a CPU
optimization.
If you have some sort of join against a big table, and do a lot of
processing on each component, there might be CPU benefits from the
split:
create table customers(
id customer_id, name character varying, other fields
); --- And we're a phone company with 8 millions of them...
create table customer_status (
customer_id customer_id,
status status_code
);
create table customer_address (
customer_id customer_id,
address_info...
);
And then are doing:
select c.id, sum(status), address_label(c.id), balance(c.id) from
customers c, customer_status cs;
We know there's going to be a SEQ SCAN against customers, because
that's the big table.
If I wanted to finish the query as fast as possible, as things stand
now, and had 4 CPUs, I would run 4 concurrent queries, for 4 ranges of
customers.
The Really Cool approach would be for PostgreSQL to dole out customers
across four processors, perhaps throwing a page at a time at each CPU,
where each process would quasi-independently build up their respective
result sets.
--
let name="cbbrowne" and tld="libertyrms.info" in String.concat "@" [name;tld];;
<http://dev6.int.libertyrms.com/;
Christopher Browne
(416) 646 3304 x124 (land)
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: cbbrowne@libertyrms.info
Subject: Re: Perfomance Tuning
In-Reply-To: <60r83ptm07.fsf@dev6.int.libertyrms.info>
References: <Pine.BSF.4.44.0308130945160.15110-100000@torgo.978.org> <200308130846.55991.josh@agliodbs.com> <60r83ptm07.fsf@dev6.int.libertyrms.info>
* 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