From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Strahinja Kustudić <strahinjak(at)nordeus(dot)com> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17330: EXPLAIN hangs and very long query plans |
Date: | 2021-12-10 09:52:41 |
Message-ID: | CAFj8pRD9Pv=aWzGMXy2P2XurM31mzdKpub+vJ0SwTJu1F3SJ-w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi
pá 10. 12. 2021 v 10:25 odesílatel Strahinja Kustudić <
strahinjak(at)nordeus(dot)com> napsal:
> On Fri, Dec 10, 2021 at 2:36 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>
>> Sounds like a problem with get_actual_variable_range(), which can scan
>> indexes at plan time to determine minimum or maximum values.
>>
>> This actually has been improved quite a bit since Postgres 10. So as
>> Jeff said, seems like you might benefit from upgrading to a newer
>> major version. v11 has improved things in this exact area.
>>
>
> On my Docker instance when I execute EXPLAIN it starts reading a lot of
> data. The indexes of the biggest table the query reads are 50GB, so my
> guess is that it reads those indexes.
>
> I allowed EXPLAIN in Docker to finish and it took almost 500 seconds and
> it was reading data all the time. After I reindexed the biggest table,
> EXPLAIN finished instantly. Can the index corruption cause this?
>
The index can be bloated.
> Note that this started happening in production after we deleted a few
> million rows from the biggest table.
>
it is maybe same issue
https://www.postgresql.org/message-id/9ADAF560-F331-4AF8-A28A-F005070C3187%40yandex.ru
Regards
Pavel
> Regards,
> Strahinja
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Dolgov | 2021-12-10 14:22:31 | Re: BUG #17326: Postgres crashed when pg_reload_conf() with ssl certificate parameters |
Previous Message | Strahinja Kustudić | 2021-12-10 09:25:38 | Re: BUG #17330: EXPLAIN hangs and very long query plans |