2009/8/19 Kevin Kempter <kev...@consistentstate.com> > > We do have an index on url_hits.time > > not sure why timestamps were not used, I was not here for the design phase. >
What's type of time column? I don't like it casts it to double in explain. If it is integer, may be you need to change and time >= extract ('epoch' from timestamp '2009-08-12') and time < extract ('epoch' from timestamp '2009-08-13' ) to and time >= extract ('epoch' from timestamp '2009-08-12')::int4 and time < extract ('epoch' from timestamp '2009-08-13' )::int4 for the index to be used?