Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows) - Mailing list pgsql-jdbc

From Reuven M. Lerner
Subject Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows)
Date
Msg-id 51A14769.1080409@lerner.co.il
Whole thread Raw
In response to Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows)  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows)
List pgsql-jdbc
Hi, Dave.  Thanks for the response.  You wrote:

> The problem lies in the fact that JDBC uses an unnamed statement to do
> the query. The planner can't plan these very well as the parameters are
> not available at plan time.

Is there any way to avoid this, and to give the planner more hints?  Is
there an option in JDBC that can give us a more direct connection?
>
> This does not explain the slowness on linux however. Is postgresql tuned
> on linux, or windows ?

The tuning suggestions that I've given were pretty plain overall, and
mostly involved changing the amounts given to shared_buffers and
effective_cache_size.  I know that I gave them suggestions for the Linux
box, so if any tuning was done, it was actually there.  I was quite
surprised to hear that they were even trying it on Windows, let alone
that it gave significantly better performance.

On the Linux side, they've switched from ext3 to (non-journaled) ext2,
to improve performance.  Execution is excellent on Linux, except via
JDBC and bound parameters.

Any other suggestions regarding the differences between Windows and
Linux?  As you can imagine, this is really puzzling me (er, us).

Reuven

--
Reuven M. Lerner -- Web development, consulting, and training
Mobile: +972-54-496-8405 * US phone: 847-230-9795
http://lerner.co.il * Skype/AIM: reuvenlerner


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows)
Next
From: Dave Cramer
Date:
Subject: Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows)