Re: Postgres 15 SELECT query doesn't use index under RLS

Поиск
Список
Период
Сортировка
От Tomek
Тема Re: Postgres 15 SELECT query doesn't use index under RLS
Дата
Msg-id CACUaW3RUoQu6i7LHUOPe3Rg28AzTc052GH-Pn1fK1+nZaukQ7A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgres 15 SELECT query doesn't use index under RLS  (Alexander Okulovich <aokulovich@stiltsoft.com>)
Ответы Re: Postgres 15 SELECT query doesn't use index under RLS  (Alexander Okulovich <aokulovich@stiltsoft.com>)
Список pgsql-performance
Hi Alexander!
Apart from the problem you are writing about I'd like to ask you to explain how you interpret counted frac_MCV - for me it has no sense at all to summarize most_common_freqs.
Please rethink it and explain what was the idea of such SUM ? I understand that it can be some measure for ratio of NULL values but only in some cases when n_distinct is small.

regards

Statistics: n_distinct, MCV, histogram

Useful to check statistics leading to bad join plan. SELECT (SELECT sum(x) FROM unnest(most_common_freqs) x) frac_MCV, tablename, attname, inherited, null_frac, n_distinct, array_length(most_common_vals,1) n_mcv, array_length(histogram_bounds,1) n_hist, correlation FROM pg_stats WHERE attname='...' AND tablename='...' ORDER BY 1 DESC;

Returns 0 rows.


Kind regards,

Alexander

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres 15 SELECT query doesn't use index under RLS
Следующее
От: Alexander Okulovich
Дата:
Сообщение: Re: Postgres 15 SELECT query doesn't use index under RLS