Re: Slow statement when using JDBC - Mailing list pgsql-jdbc

From Maciek Sakrejda
Subject Re: Slow statement when using JDBC
Date
Msg-id AANLkTik5eqiMj-GZDahLJ1HiL==xfQGxp-wZbxJwnBws@mail.gmail.com
Whole thread Raw
In response to Slow statement when using JDBC  (yazan suleiman <yazan.suleiman@gmail.com>)
Responses Re: Slow statement when using JDBC  (yazan suleiman <yazan.suleiman@gmail.com>)
List pgsql-jdbc
My guess is the named (as opposed to anonymous) server-side prepared
statements kick in and the planning is happening sans parameters (see
the prepareThreshold connection parameter--see
http://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters
), leading to a seq scan. Is it by chance only happening on the fifth
invocation of that statement? Or are you changing prepareThreshold? If
that's the case, you may want to bump prepareThreshold so that you
never get a named statement here. If this is happening right off the
bad and you're not mucking with the threshold, something more
interesting is going on and we'd need more details on your Java code.

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
www.truviso.com

pgsql-jdbc by date:

Previous
From: yazan suleiman
Date:
Subject: Slow statement when using JDBC
Next
From: yazan suleiman
Date:
Subject: Re: Slow statement when using JDBC