Tom Lane wrote:
> It looks pretty obvious from the peanut gallery: in the parameterized
> query, the planner daren't choose an indexscan, because for the vast
> majority of the possible values of the parameter an indexscan would
> suck.
The JDBC driver is using an unnamed statement in this case, shouldn't
the planner end up using index selectivity estimates based on the actual
parameter values?
From the explain output that just came through it looks like a type
mismatch problem on the timestamp parameter.
-O