Re: view reading information_schema is slow in PostgreSQL 12

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: view reading information_schema is slow in PostgreSQL 12
Дата
Msg-id CAHOFxGpDPALxkCVQwVmCA0TGM5RVoDGDEqizRuRNmOgx-MQHAQ@mail.gmail.com
обсуждение исходный текст
Ответ на view reading information_schema is slow in PostgreSQL 12  (regrog <andrea.vencato@gmail.com>)
Список pgsql-performance
On Fri, Jun 12, 2020 at 12:26 PM regrog <andrea.vencato@gmail.com> wrote:
I'm facing performance issues migrating from postgres 10 to 12 (also from 11
to 12) even with a new DB.
Th performance difference is huge 300ms in pg10 vs 3 minutes in pg12.

I have a view that abstracts the data in the database:

CREATE OR REPLACE VIEW public.my_constraints


Assuming your DDL changes fairly seldomly, and you already have a well structured deployment process in place for that, perhaps just change this to a materialized view and refresh (concurrently) after any DDL gets executed. That way, you have stats on what your view has in it and are not subject to issues with planning the execution of the query in this view. 

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Performance issue
Следующее
От: regrog
Дата:
Сообщение: Re: view reading information_schema is slow in PostgreSQL 12