Re: Simple JOIN on heavy table not using expected index
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Simple JOIN on heavy table not using expected index |
| Дата | |
| Msg-id | 1394633.1707491575@sss.pgh.pa.us обсуждение |
| Ответ на | Simple JOIN on heavy table not using expected index (kimaidou <kimaidou@gmail.com>) |
| Ответы |
Re: Simple JOIN on heavy table not using expected index
|
| Список | pgsql-performance |
kimaidou <kimaidou@gmail.com> writes:
> It seems PostgreSQL does not use the index parcelles_dep_idx on "dep" (text
> field), even if the corresponding number of lines for this WHERE clause is
> a smal subset of the entire data:
> approx 6M against 80M in total
6M out of 80M rows is not a "small subset". Typically I'd expect
the planner to use an index-based scan for up to 1 or 2 percent of
the table. Beyond that, you're going to be touching most pages
of the table anyway.
You can try reducing random_page_cost to favor indexscans, but
you might not find that the query gets any faster.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера