Re: seqscan strikes again
| От | Tom Lane |
|---|---|
| Тема | Re: seqscan strikes again |
| Дата | |
| Msg-id | 6304.1100042672@sss.pgh.pa.us обсуждение |
| Ответ на | seqscan strikes again ("Jim C. Nasby" <decibel@decibel.org>) |
| Список | pgsql-performance |
"Jim C. Nasby" <decibel@decibel.org> writes:
> I'm wondering if there's any way I can tweak things so that the estimate
> for the query is more accurate (I have run analyze):
> -> Index Scan using alert__tick_tsz on alert (cost=0.00..2498.49 rows=7119 width=28) (actual
time=0.006..0.030rows=12 loops=1413)
> Index Cond: (("outer".prev_end_time < ms_t(alert.tick)) AND ("outer".end_time >=
ms_t(alert.tick)))
Can you alter the data representation? 7.4 doesn't have any stats about
functional indexes and so it's not likely to come up with a good number
about the selectivity of the index on ms_t(tick). It might be worth
materializing that value as a plain column and indexing the column.
(This being a join, I'm not sure it would help any, but it seems worth
trying.)
regards, tom lane
В списке pgsql-performance по дате отправления: