Re: Excessive disk usage in WindowAgg - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Excessive disk usage in WindowAgg
Date
Msg-id 31463.1572887928@sss.pgh.pa.us
Whole thread Raw
In response to Excessive disk usage in WindowAgg  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: Excessive disk usage in WindowAgg  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> Using 92MB of disk for one integer seems excessive; the reason is clear
> from the explain:
> ...
> so the whole width of the table is being stored in the tuplestore used
> by the windowagg.

> In create_windowagg_plan, we have:

>     /*
>      * WindowAgg can project, so no need to be terribly picky about child
>      * tlist, but we do need grouping columns to be available
>      */
>     subplan = create_plan_recurse(root, best_path->subpath, CP_LABEL_TLIST);

> Obviously we _do_ need to be more picky about this; it seems clear that
> using CP_SMALL_TLIST | CP_LABEL_TLIST would be a win in many cases.
> Opinions?

Seems reasonable to me, do you want to do the honors?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Missed check for too-many-children in bgworker spawning
Next
From: Alvaro Herrera
Date:
Subject: Re: Missed check for too-many-children in bgworker spawning