Re: using custom scan nodes to prototype parallel sequential scan - Mailing list pgsql-hackers

From Kouhei Kaigai
Subject Re: using custom scan nodes to prototype parallel sequential scan
Date
Msg-id 9A28C8860F777E439AA12E8AEA7694F801077C8F@BPXM15GP.gisp.nec.co.jp
Whole thread Raw
In response to Re: using custom scan nodes to prototype parallel sequential scan  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: using custom scan nodes to prototype parallel sequential scan  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
> On 14 November 2014 07:37, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> > On 11/12/14, 1:54 AM, David Rowley wrote:
> >>
> >> On Tue, Nov 11, 2014 at 9:29 PM, Simon Riggs <simon@2ndquadrant.com
> >> <mailto:simon@2ndquadrant.com>> wrote:
> >>
> >>
> >>     This plan type is widely used in reporting queries, so will hit the
> >>     mainline of BI applications and many Mat View creations.
> >>     This will allow SELECT count(*) FROM foo to go faster also.
> >>
> >> We'd also need to add some infrastructure to merge aggregate states
> >> together for this to work properly. This means that could also work
> >> for
> >> avg() and stddev etc. For max() and min() the merge functions would
> >> likely just be the same as the transition functions.
> >
> >
> > Sanity check: what % of a large aggregate query fed by a seqscan
> > actually spent in the aggregate functions? Even if you look strictly
> > at CPU cost, isn't there more code involved to get data to the
> > aggregate function than in the aggregation itself, except maybe for
> numeric?
> 
> Yes, which is why I suggested pre-aggregating before collecting the streams
> together.
> 
> The point is not that the aggregation is expensive, its that the aggregation
> eats data and the required bandwidth for later steps is reduced and hence
> does not then become a bottleneck that renders the parallel Seq Scan
> ineffective.
> 
I'd like to throw community folks a question. 
Did someone have a discussion to the challenge of aggregate push-down across
relations join in the past? It potentially reduces number of rows to be joined.
If we already had, I'd like to check up the discussion at that time.

Thanks,
--
NEC OSS Promotion Center / PG-Strom Project
KaiGai Kohei <kaigai@ak.jp.nec.com>

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Size of regression database
Next
From: Jeremy Harris
Date:
Subject: Re: EXPLAIN ANALYZE output weird for Top-N Sort