> 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