Re: Slow query after upgrades

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tom Duffey <tduffey(at)techbydesign(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Slow query after upgrades
Date: 2007-12-13 23:54:41
Message-ID: 4761C641.30308@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2007-12-13 23:57:52 Re: Slow query after upgrades
Previous Message Tom Lane 2007-12-13 23:31:05 Re: Slow query after upgrades