From: Mischa Sandberg <mischa.sandberg@telus.net>
To: pgsql-performance@postgresql.org
Subject: Re: Prefetch
Date: Wed, 11 May 2005 12:06:56 -0700
Message-ID: <1115838416.428257d0e5bc3@webmail.telus.net> (raw)
In-Reply-To: <42818FB1.4060403@familyhealth.com.au>
References: <200505100652.51401.molson@oceanconsulting.com>
<42818B2E.8060403@vilain.net>
<42818FB1.4060403@familyhealth.com.au>
Quoting Christopher Kings-Lynne <chriskl@familyhealth.com.au>:
> > Another trick you can use with large data sets like this when you
> want
> > results
> > back in seconds is to have regularly updated tables that aggregate
> the data
> > along each column normally aggregated against the main data set.
>
> > Maybe some bright person will prove me wrong by posting some
> working
> > information about how to get these apparently absent features
> working.
>
> Most people just use simple triggers to maintain aggregate summary
> tables...
Don't know if this is more appropriate to bizgres, but:
What the first poster is talking about is what OLAP cubes do.
For big aggregating systems (OLAP), triggers perform poorly,
compared to messy hand-rolled code. You may have dozens
of aggregates at various levels. Consider the effect of having
each detail row cascade into twenty updates.
It's particularly silly-looking when data is coming in as
batches of thousands of rows in a single insert, e.g.
COPY temp_table FROM STDIN;
UPDATE fact_table ... FROM ... temp_table
INSERT INTO fact_table ...FROM...temp_table
(the above pair of operations is so common,
Oracle added its "MERGE" operator for it).
Hence my recent post (request) for using RULES to aggregate
--- given no luck with triggers "FOR EACH STATEMENT".
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mischa.sandberg@telus.net
Subject: Re: Prefetch
In-Reply-To: <1115838416.428257d0e5bc3@webmail.telus.net>
* 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