From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ants Aasma <ants.aasma@eesti.ee>
Cc: pgsql-performance@postgresql.org
Subject: Re: Bogus startup cost for WindowAgg
Date: Wed, 13 Oct 2010 13:30:22 -0400
Message-ID: <29317.1286991022@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTin=Zy22T1o88DkRhCpzq50j44PNs9zesXb7Y_rK@mail.gmail.com>
References: <AANLkTin=Zy22T1o88DkRhCpzq50j44PNs9zesXb7Y_rK@mail.gmail.com>
Ants Aasma <ants.aasma@eesti.ee> writes:
> Seems that the window aggregate node doesn't take into account that it
> has to consume the whole input before outputting the first row.
Well, the reason it doesn't assume that is it's not true ;-). In this
particular case it's true, but more generally you only have to read the
current input partition, and often not even all of that.
I'm not sure offhand how much intelligence would have to be added to
make a reasonable estimate of the effects of having to read ahead of the
current input row, but it's probably not trivial. We haven't spent much
time at all yet on creating a realistic cost model for WindowAgg...
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, ants.aasma@eesti.ee
Subject: Re: Bogus startup cost for WindowAgg
In-Reply-To: <29317.1286991022@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