Re: Performance of aggregates over set-returning functions

From: "John Smith" <sodgodofall(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance of aggregates over set-returning functions
Date: 2008-01-09 03:33:33
Message-ID: b88f0d670801081933t6c7cc50ci896a94d7d9f7ec17@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> > Interestingly though, when the range in the generate_series() was
> > small enough to fit in 4 bytes of memory (e.g.
> > generate_series(1,1000000000) ), the above query completed consuming
> > only negligible amount of memory. So, it looked like the aggregate
> > computation was being pipelined with the tuples returned from
> > generate_series().
>
> It's pipelined either way. But int8 is a pass-by-reference data type,
> and it sounds like we have a memory leak for this case.

Thanks for your reply. How easy is it to fix this? Which portion of
the code should we look to change?

- John

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-01-09 03:51:04 Re: Performance of aggregates over set-returning functions
Previous Message Tom Lane 2008-01-09 03:07:23 Re: Performance of aggregates over set-returning functions