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

From Heikki Linnakangas
Subject Re: Jdbc/postgres performance
Date
Msg-id 45362363.2060904@enterprisedb.com
Whole thread Raw
In response to Re: Jdbc/postgres performance  ("Rohit_Behl" <Rohit_Behl@infosys.com>)
Responses Re: Jdbc/postgres performance
List pgsql-performance
Rohit_Behl wrote:
> Hi
>
> I made the following changes to the conf file:
>
> enable_indexscan = true
>
> enable_seqscan = false
>
> We also have a large amount of data being inserted into our tables. I was just wondering if this could have an impact
onthe inserts since I guess this change is on the database. 

enable_seqscan shouldn't affect plain inserts, but it will affect
*every* query in the system.

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.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-performance by date:

Previous
From: mark@mark.mielke.cc
Date:
Subject: Re: Optimization of this SQL sentence
Next
From: "Merlin Moncure"
Date:
Subject: Re: Jdbc/postgres performance