AW: indexes and big tables - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: indexes and big tables
Date
Msg-id 11C1E6749A55D411A9670001FA6879633683A7@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
Responses Re: indexes and big tables
List 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 by date:

Previous
From: Robert Vojta
Date:
Subject: indexes and big tables
Next
From: mlw
Date:
Subject: From TODO, XML?