| От | Sean Chittenden |
|---|---|
| Тема | Re: again on index usage |
| Дата | |
| Msg-id | 20020107175321.C67695@ninja1.internal обсуждение исходный текст |
| Ответ на | Re: again on index usage (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
> It's difficult to tell from this what it thinks the selectivity of the > ipdate index would be, since the rows estimate includes the effect of > the ipaddr and router restrictions. What do you get from just > > explain > SELECT sum(input) FROM iplog_gate200112 > WHERE > '2001-12-01 00:00:00+02' <= ipdate AND ipdate < '2001-12-02 00:00:00+02' AND > '2001-12-01 00:00:00+02' <= ipdate AND ipdate < '2002-01-01 00:00:00+02'; > I don't know if this'd help, but if you're suming the data and running this query often, see if a function index would help: CREATE INDEX sum_input_fnc_idx ON iplog_gate200112 (sum(input)); -sc -- Sean Chittenden
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера