Re: Analyzer for postgresql.log - Mailing list pgsql-general

From Tielman J de Villiers
Subject Re: Analyzer for postgresql.log
Date
Msg-id E1F206EC93DCD4119A05009027A41359064AEF@sbssvr.bondnet.co.za
Whole thread Raw
In response to Analyzer for postgresql.log  (Antonio Fiol Bonnín <fiol@w3ping.com>)
List pgsql-general
Thank you,

I will be using this in a cronjob to act kind of as the "analog" web log
analyser for my postgres logs ...

Just one question -- the "list of times" (eg 13,15) wheat do they refer to
(mine all shows a "0")

Regards

Tielman J de Villiers
BondNet Pty Ltd

-----Original Message-----
From: Antonio Fiol Bonnín [mailto:fiol@w3ping.com]
Sent: Monday, December 10, 2001 2:37 PM
To: PostgreSQL General Mailing list
Subject: [GENERAL] Analyzer for postgresql.log


Attached is a little AWK script that you may find of some use.

It takes as standard input a file with the format of the Postgresql log
(level 2, for PostgreSQL 7.0.3 tested).

On standard output, you get a list of times and a mangled form of every
executed request.

Something like

13;select * from my_table where field=''
15;select * from other_table where id= and test>

All number are removed from requests. Also removed are the contents
between single quotes.

This allows me to sort by request and then either count them or add up
the times. That way I know what I need to optimize.

The script is far from perfect. It just works for me ;-)

Antonio Fiol

pgsql-general by date:

Previous
From: Alex Avriette
Date:
Subject: Suitability of postgres for very high transaction volume
Next
From: Laszlo Hornyak
Date:
Subject: Re: java stored procedures