Re: EXPLAIN (ANALYZE, BUFFERS) - puzzling numbers for a simple query.

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Pól Ua Laoínecháin <linehanp(at)tcd(dot)ie>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: EXPLAIN (ANALYZE, BUFFERS) - puzzling numbers for a simple query.
Date: 2021-06-04 13:40:36
Message-ID: CAApHDvp=0R=ELsgsE8FSw2ZzoiG9rb00YWCYU6kPeHaeum-hvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 5 Jun 2021 at 00:55, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Sat, 2021-06-05 at 00:12 +1200, David Rowley wrote:
> > As for the call to generate_series, you're not likely to ever get any
> > great estimation from that. The number of rows returned by a call to
> > that particular function are just whatever is set in pg_proc.prorows,
> > in this case, 1000. The other generate_series functions which take
> > INT and BIGINT inputs do have a prosupport function.
>
> "generate_series" has a support function from v12 on:

I'd class that as one of "the other generate_series functions", which
I mentioned. This is not the one being used in this case, which is
why I talked about prorows.

postgres=# select proname,prosupport,prorettype::regtype from pg_proc
where proname = 'generate_series';
proname | prosupport | prorettype
-----------------+------------------------------+-----------------------------
generate_series | generate_series_int4_support | integer
generate_series | generate_series_int4_support | integer
generate_series | generate_series_int8_support | bigint
generate_series | generate_series_int8_support | bigint
generate_series | - | numeric
generate_series | - | numeric
generate_series | - | timestamp without time zone
generate_series | - | timestamp with time zone

I believe the one being used here is the 2nd last one in the above
list. There's no prosupport function mentioned as of current master.

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vijaykumar Jain 2021-06-04 13:42:30 Re: strange behavior of WAL files
Previous Message Vijaykumar Jain 2021-06-04 13:15:50 Re: strange behavior of WAL files