Re: can I show number of records returned by a query in a log?

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "hyelluas" <helen_yelluas(at)mcafee(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can I show number of records returned by a query in a log?
Date: 2011-11-17 01:36:42
Message-ID: 28276bc61ac03b3009ab9bc3d9344e72.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 17 Listopad 2011, 2:07, hyelluas wrote:
> Hello,
>
> I'm trying to capture amount of data moving from client app to the server
> &
> back.
> The client is executable (c#) gue on windows, server is lunix centOS,
> PostgreSQL 8.4.
> We see serious performance difference between execution via LAN & VPN.

The VPN usually suck when it comes to a performance. Do some basic testing
at the network level - ping with/without VPN, throughput and you'll see
the difference. This is not a problem of the database, it's the
environment.

> I enabled the logging and used pgFouine to analyzed the logs and it
> looks
> very strange - 2000-3000 queries in 10 min.
>
> In one case I see the client (user is the client dbuser) query "select *
> from vw_abc" sent 10 times in 1 sec ( timestamp is the same), is it realy
> 10 times or it was logged 10 times ?
>
> I see 900 queries sent by 1 client in 7 min with 1 click on the screen -
> does the log show the real thing?

Yes, the log shows the real thing. Have you checked the log directly or
just the output of pgfounie? Theoretically there could be a bug in
pgfounie, repeating some of the queries, but I consider that highly
unlikely.

> Is it possible to log the number of records returned by that query?

Currently there's no such option. But it's possible to write a simple
extension that would do that - actually pg_stat_statements does that.

Tomas

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hyelluas 2011-11-17 02:17:36 Re: can I show number of records returned by a query in a log?
Previous Message Alan Hodgson 2011-11-17 01:19:31 Re: can I show number of records returned by a query in a log?