Re: Bogus startup cost for WindowAgg

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Bogus startup cost for WindowAgg
Date: 2010-10-13 17:30:22
Message-ID: 29317.1286991022@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Ants Aasma <ants(dot)aasma(at)eesti(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jesper Krogh 2010-10-13 17:59:48 Re: Slow count(*) again...
Previous Message Ants Aasma 2010-10-13 16:57:44 Bogus startup cost for WindowAgg