cost logging

From: stig erikson <stigerikson_nospam_(at)yahoo(dot)se>
To: pgsql-general(at)postgresql(dot)org
Subject: cost logging
Date: 2004-10-13 07:59:07
Message-ID: ckin83$2gi7$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.
For a project we are planning cost management. Each "user" should pay
for the cost he/she generates on the postgresql server.
The idea is that a query should be charged by the ammount of CPU time
used and/or the ammount of data read from disk.
The acctual time (in milliseconds) it took to execute will not be a good
way of getting the cost since the same query might take more or less
time depending on current load and depeding on the state of a table.

Question is, can in some "good" way log or save (possibly using
triggers) the CPU cost for each query that was run?
if there is such cost management?
please point me to the chapter in the manual if i simply missed it.

postgresql 7.4.5 is used, platform is linux.

/stig

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-10-13 08:27:20 Re: LISTEN/NOTIFY for lightweight replication
Previous Message Neil Conway 2004-10-13 07:55:14 Re: how to open stat mode in db