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

Поиск
Список
Период
Сортировка
От Pól Ua Laoínecháin
Тема Re: EXPLAIN (ANALYZE, BUFFERS) - puzzling numbers for a simple query.
Дата
Msg-id CAF4RT5Q5pUb5_S1NK-Q7_o76anP7Kt6aFjxwhv7QNVpGtc+C0w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: EXPLAIN (ANALYZE, BUFFERS) - puzzling numbers for a simple query.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> Laurenz Albe <laurenz.albe@cybertec.at> writes:

> > "generate_series" has a support function from v12 on:

> True, but I don't think it can do anything with non-constant inputs,
> as we have in the OP's case.


As confirmed by this:

https://dbfiddle.uk/?rdbms=postgres_12&fiddle=d0b70717faca3b094be8b4a096758b94

Plan:

==============
Sort (cost=623.22..640.72 rows=7000 width=10) (actual
time=0.067..0.070 rows=42 loops=1)
Sort Key: id, (((generate_series((start_date)::timestamp with time
zone, (end_date)::timestamp with time zone, '1
day'::interval)))::date)
Sort Method: quicksort Memory: 26kB
Buffers: shared hit=1
-> Result (cost=0.00..176.16 rows=7000 width=10) (actual
time=0.014..0.045 rows=42 loops=1)
Buffers: shared hit=1
-> ProjectSet (cost=0.00..36.16 rows=7000 width=14) (actual
time=0.013..0.033 rows=42 loops=1)
CUT
==============

It goes for the full 7,000 even after a VACUUM FULL VERBOSE ANALYZE test;


Pól...

>                         regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: strange behavior of WAL files
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: BUG #17046: Upgrade postgres 11 to 13 version