Re: Jdbc/postgres performance - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: Jdbc/postgres performance
Date
Msg-id b42b73150610180620g256ba45fp1238afcae6f74c45@mail.gmail.com
Whole thread Raw
In response to Re: Jdbc/postgres performance  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: Jdbc/postgres performance
Next
From: "Merlin Moncure"
Date:
Subject: Re: Jdbc/postgres performance