From: Dimitri <dimitrik.fr@gmail.com>
To: Rainer Bauer <usenet@munnin.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Data transfer very slow when connected via DSL
Date: Fri, 22 Jun 2007 00:38:40 +0200
Message-ID: <5482c80a0706211538ka531c18gcf681cd5a68066b2@mail.gmail.com> (raw)
In-Reply-To: <b7tl73pk8u5hptorgnpug6muv0g7bja4q4@4ax.com>
References: <s7tk73d57kvb3f4ph1kmkvhdfe0kak5a1r@4ax.com>
<16953.1182439969@sss.pgh.pa.us>
<a1el7395bhsv3n867kvefucj90l808hi54@4ax.com>
<5482c80a0706211432g170154e7x4ee36e5148d272d5@mail.gmail.com>
<b7tl73pk8u5hptorgnpug6muv0g7bja4q4@4ax.com>
Let's stay optimist - at least now you know the main source of your problem! :))
Let's see now with CURSOR...
Firstly try this:
munnin=>\timing
munnin=>\set FETCH_COUNT 1;
munnin=>select * from "tblItem";
what's the time you see here? (I think your application is working in
this manner)
Now, change the FETCH_COUNT to 10, then 50, then 100 - your query
execution time should be better (at least I hope so :))
And if it's better - you simply need to modify your FETCH clause with
adapted "FORWARD #" value (the best example is psql source code
itself, you may find ExecQueryUsingCursor function implementation
(file common.c))...
Rgds,
-Dimitri
On 6/22/07, Rainer Bauer <usenet@munnin.com> wrote:
> Hello Dimitri,
>
> >but did you try to execute your query directly from 'psql' ?...
>
> munnin=>\timing
> munnin=>select * from "tblItem";
> <data snipped>
> (50 rows)
> Time: 391,000 ms
>
> >Why I'm asking: seems to me your case is probably just network latency
> >dependent, and what I noticed during last benchmarks with PostgreSQL
> >the SELECT query become very traffic hungry if you are using CURSOR.
> >Program 'psql' is implemented to not use CURSOR by default, so it'll
> >be easy to check if you're meeting this issue or not just by executing
> >your query remotely from 'psql'...
>
> Yes, see also my other post.
>
> Unfortunatelly this means that using my program to connect via DSL to the
> Postgres database is not possible.
>
> Rainer
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: dimitrik.fr@gmail.com, usenet@munnin.com
Subject: Re: Data transfer very slow when connected via DSL
In-Reply-To: <5482c80a0706211538ka531c18gcf681cd5a68066b2@mail.gmail.com>
* 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