Re: Bad plan choices & statistic targets with a GIN index
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Bad plan choices & statistic targets with a GIN index |
| Дата | |
| Msg-id | 1719.1384441214@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Bad plan choices & statistic targets with a GIN index (Dieter Komendera <dieter@komendera.com>) |
| Список | pgsql-performance |
Dieter Komendera <dieter@komendera.com> writes:
> Because I didn't find any documentation or references on setting statistic targets on indices, I just gave it a shot:
> ALTER TABLE index_games_participants ALTER COLUMN "array" SET STATISTICS 1000;
This works, and will help if the planner can make use of statistics on the
expression the index is indexing. The reason it's not documented is that
it's not considered supported (yet), primarily because pg_dump won't dump
such a setting. And the reason for that is mainly that the column names
of an index aren't guaranteed stable across PG versions. But as long
as you're willing to remember to restore the setting manually, it's
a reasonable thing to do if it helps your query plans.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера