pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Tom Duffey <tduffey@techbydesign.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Slow query after upgrades
Date: Thu, 13 Dec 2007 20:03:21 -0500
Message-ID: <23430.1197594201@sss.pgh.pa.us> (raw)
In-Reply-To: <4761C641.30308@opencloud.com>
References: <3EB52707-C945-43D6-9B3F-15F3B228D6F6@techbydesign.com>
	<4761A221.80604@opencloud.com>
	<A95A2028-7E3C-4FC1-A911-87BB6E577D54@techbydesign.com>
	<1d4e0c10712131358m4bbc3f57t7e33c6c8ad2b3710@mail.gmail.com>
	<435EC9B4-F3DD-4136-9070-93E0DBB94B3F@techbydesign.com>
	<1d4e0c10712131452l65841793r449eb3c7cffbf3a5@mail.gmail.com>
	<0116C2A9-8DB5-4EBE-A66B-BE7F2A11651C@techbydesign.com>
	<4761BACA.4020008@opencloud.com>
	<22413.1197588665@sss.pgh.pa.us>
	<4761C641.30308@opencloud.com>

Oliver Jowett <oliver@opencloud.com> writes:
> 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?

If he's using a recent enough backend, it should.

>  From the explain output that just came through it looks like a type 
> mismatch problem on the timestamp parameter.

Yeah, no question.  Implicit casts to text strike again :-(.  He was
probably getting the wrong answers, not only a slow query.

			regards, tom lane



view thread (22+ messages)  latest in thread

Message-ID: <23430.1197594201@sss.pgh.pa.us>
Permalink:  ../23430.1197594201@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23430.1197594201@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, oliver@opencloud.com, tduffey@techbydesign.com
  Subject: Re: Slow query after upgrades
  In-Reply-To: <23430.1197594201@sss.pgh.pa.us>
  References: <3EB52707-C945-43D6-9B3F-15F3B228D6F6@techbydesign.com> <4761A221.80604@opencloud.com> <A95A2028-7E3C-4FC1-A911-87BB6E577D54@techbydesign.com> <1d4e0c10712131358m4bbc3f57t7e33c6c8ad2b3710@mail.gmail.com> <435EC9B4-F3DD-4136-9070-93E0DBB94B3F@techbydesign.com> <1d4e0c10712131452l65841793r449eb3c7cffbf3a5@mail.gmail.com> <0116C2A9-8DB5-4EBE-A66B-BE7F2A11651C@techbydesign.com> <4761BACA.4020008@opencloud.com> <22413.1197588665@sss.pgh.pa.us> <4761C641.30308@opencloud.com> <23430.1197594201@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox