Re: [HACKERS] [PATCH] Push limit to sort through a subquery - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [PATCH] Push limit to sort through a subquery
Date
Msg-id 10711.1503684080@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [PATCH] Push limit to sort through a subquery  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] [PATCH] Push limit to sort through a subquery  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On another note, here's a second patch applying on top of my earlier
> patch to push down Limit through Gather and Gather Merge.

I looked through this a little, and feel uncomfortable with the division
of typedefs between execnodes.h and tuplesort.h.  I'm inclined to push
struct SortInstrumentation, and maybe also SharedSortInfo, into
tuplesort.h.  Then tuplesort_get_stats could be given the signature
void tuplesort_get_stats(Tuplesortstate *state,                         SortInstrumentation *stats);

which seems less messy.  Thoughts?

I'm also pretty suspicious of the filter code you added to subselect.sql.
What happens when there's more than one worker?

(BTW, would it make sense to number the workers from 1 not 0 in the
EXPLAIN printout?)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [PATCH] Push limit to sort through a subquery
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] ECPG: WHENEVER statement with DO CONTINUE action