| От | Tom Lane |
|---|---|
| Тема | Re: Query on postgresql 7.4.2 not using index |
| Дата | |
| Msg-id | 19483.1145978579@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Query on postgresql 7.4.2 not using index (Arnau <arnaulist@andromeiberica.com>) |
| Ответы |
Re: Query on postgresql 7.4.2 not using index
|
| Список | pgsql-performance |
Arnau <arnaulist@andromeiberica.com> writes:
> Seq Scan on agenda_users_groups (cost=0.00..53108.45 rows=339675
> width=8) (actual time=916.903..5763.830 rows=367026 loops=1)
> Filter: (group_id = 9::numeric)
> Total runtime: 7259.861 ms
> (3 filas)
> espsm_moviltelevision=# select count(*) from agenda_users_groups ;
> count
> ---------
> 2547556
So the SELECT is fetching nearly 15% of the rows in the table. The
planner is doing *the right thing* to use a seqscan, at least for
this particular group_id value.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера