From: Radosław Smogura <rsmogura@softperience.eu>
To: pgsql-jdbc@postgresql.org
Cc: Clemens Eisserer <linuxhippy@gmail.com>
Subject: Re: Slow query execution over WAN network
Date: Thu, 24 Feb 2011 18:07:51 +0100
Message-ID: <201102241807.51960.rsmogura@softperience.eu> (raw)
In-Reply-To: <AANLkTin88xQQsoK85qXJkEECaHj5XTLLrOkZGZoyE_j7@mail.gmail.com>
References: <AANLkTin88xQQsoK85qXJkEECaHj5XTLLrOkZGZoyE_j7@mail.gmail.com>
Clemens Eisserer <linuxhippy@gmail.com> Thursday 24 February 2011 15:56:10
> Hi,
>
> I experience really slow query execution over remote networks,
> especially for a query which returns a lot of columns (~255) caused by
> joins.
>
> Executing the same query over different networks gives the following times:
> Local: 20ms
> DSL: 400ms
> UMTS: 1500ms
>
> The query returns 12 rows, and 255 column - most of them with only
> very little data. A wireshark-snapshot of a request is only ~30kb
> large, so I guess there isn't a lot of data transported.
>
> I've uploaded a netbeans-profiler screenshot as well as a wireshark profile
> to: http://93.190.88.182/jdbc_traffic.wireshark
> http://93.190.88.182/jdbc_profile.png
>
> Any idea whats causing the high latency? Are there multiple
> round-trips going on here?
> I already tried adjusting fetch size, however didn't change anything.
>
> Thank you in advance, Clemens
>
> PS: I've asked the question already on pgsql-performance,
> unfourtunatly there wasn't a lot of feedback. Sorry for cross-posting.
Hi,
You truncated times in profiler window. May I ask what time was measured for
socket.read(), and what kind of connection did you used for this (dsl, umts),
connection speed and min/max/avg ping time to database server?
What other operations are performed inside benchamrkQuery(), commit/rollback,
connection open?
Did fetch size wa,s when you was making this test, enaught to get all records
at once?
It is highly probable that something is wrong.
Regards,
Radek
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: rsmogura@softperience.eu, linuxhippy@gmail.com
Subject: Re: Slow query execution over WAN network
In-Reply-To: <201102241807.51960.rsmogura@softperience.eu>
References: <AANLkTin88xQQsoK85qXJkEECaHj5XTLLrOkZGZoyE_j7@mail.gmail.com> <201102241807.51960.rsmogura@softperience.eu>
* 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