AW: indexes and big tables

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB
Тема AW: indexes and big tables
Дата
Msg-id 11C1E6749A55D411A9670001FA6879633683A7@sdexcsrv1.f000.d0188.sd.spardat.at
обсуждение исходный текст
Ответы Re: indexes and big tables  (Robert Vojta <vojta@ipex.cz>)
Список pgsql-hackers
> netacc=> EXPLAIN (SELECT SUM(counterfrom) AS from, 
> SUM(counterto) AS to,
> floor((985098900 - date_part('epoch', counterstamp)) / 300) 
> AS sequence
> FROM counters WHERE line='absolonll' AND date_part('epoch', 
> ) counterstamp > 984978900 GROUP BY sequence, line) ...

I would guess the problem is the restriction on counterstamp, because 
written like that, it probably can't use the index.

try something where you avoid the use of the date_part function e.g.:AND counterstamp > '2001-07-26 00:00:00.0'

Andreas


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Vojta
Дата:
Сообщение: indexes and big tables
Следующее
От: mlw
Дата:
Сообщение: From TODO, XML?