Re: bytea, jdbc, i/o ... - Mailing list pgsql-general

From Tom Lane
Subject Re: bytea, jdbc, i/o ...
Date
Msg-id 18043.1030512830@sss.pgh.pa.us
Whole thread Raw
In response to bytea, jdbc, i/o ...  (Kenneth Been <kennethb@telocity.com>)
List pgsql-general
Kenneth Been <kennethb@telocity.com> writes:
> Here is the strange behavior:
> For database A, the difference in performance between testing
> locally and testing over the network is negligible; about 5%
> slower over the network.  About what I would expect.  But for
> database B, the difference is huge; about 35 times slower over
> the network.

That's odd.

> Here is my guess for what is going on:
> Maybe for a local connection the db engine delivers the bytea as
> is, whereas for a remote connection it converts the bytea to a
> string representation, and then Java would have to convert it
> back for the getBytes() method.

I don't believe that for a millisecond; there simply is not any
local/remote discrimination in the backend.

I'm not sure what the problem is, but I think you need to find a
different tree to bark up.

Some other thoughts that come to mind involve network saturation,
routing problems, DNS problems, SSL encryption overhead, multibyte
encoding conversion, yadda yadda...

            regards, tom lane

pgsql-general by date:

Previous
From: David Link
Date:
Subject: Re: Screwy behavior with SUM and multiple joins to same table
Next
From: pgsql-gen@basebeans.com (pgsql-gen Newsgroup (@Basebeans.com))
Date:
Subject: Re: Screwy behavior with SUM and multiple joins to same table