dbTalk Databases Forums  

PG_STAT_DATABASE

comp.databases.postgresql comp.databases.postgresql


Discuss PG_STAT_DATABASE in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mladen Gogala
 
Posts: n/a

Default PG_STAT_DATABASE - 01-28-2010 , 10:09 AM






I am looking into the PostgreSQL dictionary. The view pg_stat_activity is
the PgSQL version of v$session. There are interesting views named
pg_stat_database and pg_stat_user_tables. What is the starting point for
those stat views? Is that since the database and table, in case of the
latter view, was created? Is it since the last restart of the instance? I
was unable to find that in the documentation.

Here is the description of the view in question:

View "pg_catalog.pg_stat_database"
Column | Type | Modifiers
---------------+---------+-----------
datid | oid |
datname | name |
numbackends | integer |
xact_commit | bigint |
xact_rollback | bigint |
blks_read | bigint |
blks_hit | bigint |
tup_returned | bigint |
tup_fetched | bigint |
tup_inserted | bigint |
tup_updated | bigint |
tup_deleted | bigint |

--
http://mgogala.byethost5.com

Reply With Quote
  #2  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: PG_STAT_DATABASE - 01-28-2010 , 10:12 AM






On Thu, 28 Jan 2010 16:09:23 +0000, Mladen Gogala wrote:

Quote:
I am looking into the PostgreSQL dictionary. The view pg_stat_activity
is the PgSQL version of v$session. There are interesting views named
pg_stat_database and pg_stat_user_tables. What is the starting point for
those stat views? Is that since the database and table, in case of the
latter view, was created? Is it since the last restart of the instance?
I was unable to find that in the documentation.

Here is the description of the view in question:

View "pg_catalog.pg_stat_database"
Column | Type | Modifiers
---------------+---------+-----------
datid | oid |
datname | name |
numbackends | integer |
xact_commit | bigint |
xact_rollback | bigint |
blks_read | bigint |
blks_hit | bigint |
tup_returned | bigint |
tup_fetched | bigint |
tup_inserted | bigint |
tup_updated | bigint |
tup_deleted | bigint |
Please, ignore the question. I found the answer in the documentation:
http://www.postgresql.org/docs/8.4/s...ing-stats.html

The views are not clearly documented but when I started searching for the
underlying functions, it popped up like a charm.



--
http://mgogala.byethost5.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.