pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stef <stef@chronozon.artofdns.com>
To: pgsql-sql@postgresql.org
Subject: Historical logging of pg_stat_activity ?
Date: Tue, 13 Jan 2004 16:40:57 -0500
Message-ID: <20040113214057.GA24821@survivor.hades> (raw)

hello everyone,

	Yes, yet agian i have a rather crazy idea,
go with me on this and hopefully it will make a bit
more sense than normal :)

	Currently, i have a rather extensive application
that gets a lot of queries, i was wanting to track the
general 'usage' pattern overtime, but of course, that
would require a sort of 'historical view' of pg_stat_activity.
If there was such a thing, then it would let me isolate
hotspots or queries that were often used and allow me
to focus on them first for speed benefits, as well as
allowing me to produce some nifty histograms :)

	So, the long and short, is there a pg_stat table
that contains the most 'used' queries and also (i know i
am shooting for the moon here) execution time ?

	I know i -could- log_timestamp and log_statement
and then parse out (using perl) the most called ones for
each day and then sort them all and ... but thats a bit of
a pain if there is already such a thing in existence.

	regards
	Stef



Message-ID: <20040113214057.GA24821@survivor.hades>
Permalink:  ../20040113214057.GA24821@survivor.hades/
Also on:    postgresql.org/message-id/20040113214057.GA24821@survivor.hades

 · 

reply

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-sql@postgresql.org
  Cc: stef@chronozon.artofdns.com
  Subject: Re: Historical logging of pg_stat_activity ?
  In-Reply-To: <20040113214057.GA24821@survivor.hades>

* 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