From: Oliver Jowett <oliver@opencloud.com>
To: John Lister <john.lister@kickstone.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Péter Kovács <maxottovonstirlitz@gmail.com>
Cc: Frédérik Bilhaut <frederik.bilhaut@noopsis.fr>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Very strange performance decrease when reusing a PreparedStatement
Date: Mon, 04 May 2009 11:28:23 +1200
Message-ID: <49FE2897.3020802@opencloud.com> (raw)
In-Reply-To: <49FD72A2.3050408@kickstone.com>
References: <5C2E1645-73B6-4509-96CD-FA77869516AB@noopsis.fr>
<49F71EDD.2070200@opencloud.com>
<02437794-A78D-449C-843F-B823195F9623@noopsis.fr>
<fdeb32eb0905030122t665113e5nd34e7268d9ab1863@mail.gmail.com>
<491f66a50905030310j5b4cdcd8jbf4f6e757c2ba580@mail.gmail.com>
<49FD72A2.3050408@kickstone.com>
John Lister wrote:
> However it seems that other optimisations can't be made for example it
> doesn't seem possible to tell the server that parameter 1 is always
> going to be an int and therefore it should be using index A. The current
> implementation may not use index A as it is unaware as to the type of
> the supplied parameter. Perhaps in this case the execution planner
> should pick the parameters for the most optimal plan and return the
> types during the parse and let the driver convert the data to what the
> server requires...
No it's not a problem with types at all, parameter types are fixed at
the point the named statement is created.
It's all about index selectivity statistics.
-O
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: oliver@opencloud.com, john.lister@kickstone.com, pg@fastcrypt.com, maxottovonstirlitz@gmail.com, frederik.bilhaut@noopsis.fr
Subject: Re: Very strange performance decrease when reusing a PreparedStatement
In-Reply-To: <49FE2897.3020802@opencloud.com>
References: <5C2E1645-73B6-4509-96CD-FA77869516AB@noopsis.fr> <49F71EDD.2070200@opencloud.com> <02437794-A78D-449C-843F-B823195F9623@noopsis.fr> <fdeb32eb0905030122t665113e5nd34e7268d9ab1863@mail.gmail.com> <491f66a50905030310j5b4cdcd8jbf4f6e757c2ba580@mail.gmail.com> <49FD72A2.3050408@kickstone.com> <49FE2897.3020802@opencloud.com>
* 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