Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> Maybe it's just me, but I get the feeling you need to work some regular
> reindexing into your maintenance schedule.
Or at least, more vacuuming...
> Given your query is using
> between, I don't think it would use the index on the time field anyway
> (and explain analyze seems to be supporting this). Rewrite it so that
> you have a and time > foo and time < bar and I think you'll see a
> difference.
No, you won't, because that's exactly what BETWEEN is.
regards, tom lane