pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edson Richter <edsonrichter@hotmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows)
Date: Sun, 26 May 2013 11:38:45 -0300
Message-ID: <BLU0-SMTP12271A19885ED754758F797CF950@phx.gbl> (raw)
In-Reply-To: <51A14091.7040909@lerner.co.il>
References: <51A14091.7040909@lerner.co.il>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Humm... may be out of topic - if so, please forgive...

Are you sure that your Linux box is able to resolve network names?
Try to put all involved computers ip address in hosts file for both 
computers, and give a try.
I use Linux and Windows and the slowness network I detected has been 
related to name resolution.

Regards,

Edson


Em 25/05/2013 19:52, Reuven M. Lerner escreveu:
> Hi, everyone.  A project I'm assisting is connecting to PostgreSQL 
> (9.2) via JDBC.    We're experiencing extremely slow query execution, 
> for precisely the same queries, depending on (a) operating system and 
> (b) whether we use bind parameters.
>
> We're using two different Red Hat Linux systems (one running RHEL 5, 
> and the other RHEL 6).  The machines have 16 GB and 64 GB RAM, 
> respectively, with 4+ GB allocated to shared buffers on each one. 
> However, given that the performance difference is between psql and 
> JDBC, I doubt that these are significant factors.
>
> We have two different Java programs (which do 1,000 inserts), each of 
> which we've run 10 times on each of Windows and Linux.   The average 
> time needed for running each program is:
>
> Windows: 232 ms with binding, 152 ms without binding
> Linux: 2,233 ms (yes, 2.233 *seconds*) with binding, 176 ms without 
> binding
>
> We've also run the same 1,000 inserts via psql on a remote machine, 
> and the timing was quite fast (i.e., like what we saw on the Windows 
> machine).
>
> The combination of binding + Linux seems to be the problematic one 
> here, but I'm at a loss for why.
>
> I can provide the test programs if they'll help, but I'm first 
> wondering where the problem might lie.
>
> Any suggestions or ideas?  What additional information (e.g., the test 
> programs) would help to track this problem down?
>
> Thanks in advance,
>
> Reuven
>



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (14+ messages)  latest in thread

Message-ID: <BLU0-SMTP12271A19885ED754758F797CF950@phx.gbl>
Permalink:  ../BLU0-SMTP12271A19885ED754758F797CF950@phx.gbl/
Also on:    postgresql.org/message-id/BLU0-SMTP12271A19885ED754758F797CF950@phx.gbl

 · 

reply

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-jdbc@postgresql.org
  Cc: edsonrichter@hotmail.com
  Subject: Re: Bound parameters on Linux are extremely slow (compared to unbound and/or Windows)
  In-Reply-To: <BLU0-SMTP12271A19885ED754758F797CF950@phx.gbl>
  References: <51A14091.7040909@lerner.co.il> <BLU0-SMTP12271A19885ED754758F797CF950@phx.gbl>

* 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