From: Merlin Moncure <mmoncure@gmail.com>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Rohit_Behl <Rohit_Behl@infosys.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Jdbc/postgres performance
Date: Wed, 18 Oct 2006 09:20:54 -0400
Message-ID: <b42b73150610180620g256ba45fp1238afcae6f74c45@mail.gmail.com> (raw)
In-Reply-To: <45362363.2060904@enterprisedb.com>
References: <407937EC76157D439EB0C9F9B6047EFD40017D@BLRKECMSG04.ad.infosys.com>
<407937EC76157D439EB0C9F9B6047EFD40017E@BLRKECMSG04.ad.infosys.com>
<45362363.2060904@enterprisedb.com>
On 10/18/06, Heikki Linnakangas <heikki@enterprisedb.com> wrote:
> I would suggest using setting "prepareThreshold=0" in the JDBC driver
> connection URL, or calling pstmt.setPrepareThreshold(0) in the
> application. That tells the driver not to use server-side prepare, and
> the query will be re-planned every time you execute it with the real
> values of the parameters.
that works. I think another alternative is to just turn off seqscan
temporarily for the session:
set enable_seqscan=false;
and re-enable it after prepareing the statement. however I agree that
seqscan should be enabled for normal operation. in fact, this becomes
more and more important as your database becomes really big due to
poor random i/o of hard drives.
merlin
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-performance@postgresql.org
Cc: mmoncure@gmail.com, heikki@enterprisedb.com, Rohit_Behl@infosys.com
Subject: Re: Jdbc/postgres performance
In-Reply-To: <b42b73150610180620g256ba45fp1238afcae6f74c45@mail.gmail.com>
References: <407937EC76157D439EB0C9F9B6047EFD40017D@BLRKECMSG04.ad.infosys.com> <407937EC76157D439EB0C9F9B6047EFD40017E@BLRKECMSG04.ad.infosys.com> <45362363.2060904@enterprisedb.com> <b42b73150610180620g256ba45fp1238afcae6f74c45@mail.gmail.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