pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Request small targetlist for input to WindowAgg.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Request small targetlist for input to WindowAgg.
@ 2019-11-06 05:01 Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-11-06 05:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Request small targetlist for input to WindowAgg.

WindowAgg will potentially store large numbers of input rows into
tuplestores to allow access to other rows in the frame. If the input
is coming via an explicit Sort node, then unneeded columns will
already have been discarded (since Sort requests a small tlist); but
there are idioms like COUNT(*) OVER () that result in the input not
being sorted at all, and cases where the input is being sorted by some
means other than a Sort; if we don't request a small tlist, then
WindowAgg's storage requirement is inflated by the unneeded columns.

Backpatch back to 9.6, where the current tlist handling was added.
(Prior to that, WindowAgg would always use a small tlist.)

Discussion: https://postgr.es/m/87a7ator8n.fsf@news-spur.riddles.org.uk

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a9056cc637f2d183eefa165ebbd0308d9a89abb9

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Request small targetlist for input to WindowAgg.
@ 2019-11-06 05:01 Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-11-06 05:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Request small targetlist for input to WindowAgg.

WindowAgg will potentially store large numbers of input rows into
tuplestores to allow access to other rows in the frame. If the input
is coming via an explicit Sort node, then unneeded columns will
already have been discarded (since Sort requests a small tlist); but
there are idioms like COUNT(*) OVER () that result in the input not
being sorted at all, and cases where the input is being sorted by some
means other than a Sort; if we don't request a small tlist, then
WindowAgg's storage requirement is inflated by the unneeded columns.

Backpatch back to 9.6, where the current tlist handling was added.
(Prior to that, WindowAgg would always use a small tlist.)

Discussion: https://postgr.es/m/87a7ator8n.fsf@news-spur.riddles.org.uk

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f57c63107007f3b9333d270473b9070225c23843

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Request small targetlist for input to WindowAgg.
@ 2019-11-06 05:01 Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-11-06 05:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Request small targetlist for input to WindowAgg.

WindowAgg will potentially store large numbers of input rows into
tuplestores to allow access to other rows in the frame. If the input
is coming via an explicit Sort node, then unneeded columns will
already have been discarded (since Sort requests a small tlist); but
there are idioms like COUNT(*) OVER () that result in the input not
being sorted at all, and cases where the input is being sorted by some
means other than a Sort; if we don't request a small tlist, then
WindowAgg's storage requirement is inflated by the unneeded columns.

Backpatch back to 9.6, where the current tlist handling was added.
(Prior to that, WindowAgg would always use a small tlist.)

Discussion: https://postgr.es/m/87a7ator8n.fsf@news-spur.riddles.org.uk

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/be99485b94e9f4560f0d8c8f1ed4afc258f75b08

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Request small targetlist for input to WindowAgg.
@ 2019-11-06 05:01 Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-11-06 05:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Request small targetlist for input to WindowAgg.

WindowAgg will potentially store large numbers of input rows into
tuplestores to allow access to other rows in the frame. If the input
is coming via an explicit Sort node, then unneeded columns will
already have been discarded (since Sort requests a small tlist); but
there are idioms like COUNT(*) OVER () that result in the input not
being sorted at all, and cases where the input is being sorted by some
means other than a Sort; if we don't request a small tlist, then
WindowAgg's storage requirement is inflated by the unneeded columns.

Backpatch back to 9.6, where the current tlist handling was added.
(Prior to that, WindowAgg would always use a small tlist.)

Discussion: https://postgr.es/m/87a7ator8n.fsf@news-spur.riddles.org.uk

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6da5310e8c5f243e3c927c81f8c845222cd271b8

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Request small targetlist for input to WindowAgg.
@ 2019-11-06 05:01 Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Andrew Gierth @ 2019-11-06 05:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Request small targetlist for input to WindowAgg.

WindowAgg will potentially store large numbers of input rows into
tuplestores to allow access to other rows in the frame. If the input
is coming via an explicit Sort node, then unneeded columns will
already have been discarded (since Sort requests a small tlist); but
there are idioms like COUNT(*) OVER () that result in the input not
being sorted at all, and cases where the input is being sorted by some
means other than a Sort; if we don't request a small tlist, then
WindowAgg's storage requirement is inflated by the unneeded columns.

Backpatch back to 9.6, where the current tlist handling was added.
(Prior to that, WindowAgg would always use a small tlist.)

Discussion: https://postgr.es/m/87a7ator8n.fsf@news-spur.riddles.org.uk

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/747aac88fa5377586fb2fdbd261f1d5fb7a50308

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2019-11-06 05:01 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 05:01 pgsql: Request small targetlist for input to WindowAgg. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-11-06 05:01 pgsql: Request small targetlist for input to WindowAgg. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-11-06 05:01 pgsql: Request small targetlist for input to WindowAgg. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-11-06 05:01 pgsql: Request small targetlist for input to WindowAgg. Andrew Gierth <rhodiumtoad@postgresql.org>
2019-11-06 05:01 pgsql: Request small targetlist for input to WindowAgg. Andrew Gierth <rhodiumtoad@postgresql.org>

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