Re: Slow query after upgrades - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Slow query after upgrades
Date
Msg-id 4761C641.30308@opencloud.com
Whole thread Raw
In response to Re: Slow query after upgrades  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Slow query after upgrades  ("Guillaume Smet" <guillaume.smet@gmail.com>)
Re: Slow query after upgrades  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Slow query after upgrades
Next
From: Oliver Jowett
Date:
Subject: Re: Slow query after upgrades