Re: Bogus startup cost for WindowAgg - Mailing list pgsql-performance

From Tom Lane
Subject Re: Bogus startup cost for WindowAgg
Date
Msg-id 29317.1286991022@sss.pgh.pa.us
Whole thread Raw
In response to Bogus startup cost for WindowAgg  (Ants Aasma <ants.aasma@eesti.ee>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Neil Whelchel
Date:
Subject: Re: Slow count(*) again...
Next
From: Mark Kirkwood
Date:
Subject: Re: Slow count(*) again...