Re: Slow indexscan
| От | Tom Lane |
|---|---|
| Тема | Re: Slow indexscan |
| Дата | |
| Msg-id | 17907.1182352197@sss.pgh.pa.us обсуждение |
| Ответ на | Slow indexscan ("Mikko Partio" <mpartio@gmail.com>) |
| Ответы |
Re: Slow indexscan
Re: Slow indexscan |
| Список | pgsql-performance |
"Mikko Partio" <mpartio@gmail.com> writes:
> Index Scan using tbl_20070601_pkey on tbl_20070601 t1
> (cost=0.00..365.13rows=13 width=137) (actual time=
> 120.83..10752.64 rows=539 loops=1)
> Index Cond: ((validtime >= 20070602000000::bigint) AND (validtime <=
> 20070602235500::bigint) AND (latitude = 60.2744::double precision) AND
> (longitude = 26.4417::double precision))
> Filter: (parname = 'temperature'::character varying)
You do realize that's going to scan the entire index range from
20070602000000 to 20070602235500?
If this is a typical query you'd be better off putting the lat/long
columns first in the index.
regards, tom lane
В списке pgsql-performance по дате отправления: