Re: Count actual transaction per minute?

From: Melvin Davidson <melvin6925(at)yahoo(dot)com>
To: depesz(at)depesz(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Count actual transaction per minute?
Date: 2010-05-12 16:40:40
Message-ID: 517479.97748.qm@web53002.mail.re2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks very much!  I put that query into a script that puts the initial result into a variable, sleeps for a minute, queries again into a second variable and subtracts the difference.
Works fine.

Melvin Davidson

Folk Alley - All Folk - 24 Hours a day
www.folkalley.com

--- On Wed, 5/12/10, hubert depesz lubaczewski <depesz(at)depesz(dot)com> wrote:

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
Subject: Re: [GENERAL] Count actual transaction per minute?
To: "Melvin Davidson" <melvin6925(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Date: Wednesday, May 12, 2010, 11:20 AM

sure. run:
select sum(xact_commit + xact_rollback) from pg_stat_database
every minute, substract previous result from current, and you'll know
your current tpm.

Best regards,

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz(at)depesz(dot)com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Graf 2010-05-12 16:48:00 Re: Reliability of Windows versions 8.3 or 8.4
Previous Message Richard Broersma 2010-05-12 16:33:53 Re: Reliability of Windows versions 8.3 or 8.4