Wednesday, 14 August 2024

Statistics Views for Monitoring the Server

 

PostgreSQL: Important Statistics Views for Monitoring the Server
 In this post, I am sharing few important system or statistics views which we can use for monitoring the PostgreSQL Server.

We should monitor the different statistics of the server which help us for improving the overall database performance.

Below are few important views:

Return the running queries/connections information:

1
select * from pg_stat_activity 
Return the SSL information for each connection:

1
select * from pg_stat_ssl
Check the database statistics:

1
select * from pg_stat_database
Check the table statistics:

1
select * from pg_stat_all_tables
Check the system table statistics:

1
select * from pg_stat_sys_tables
Check the index statistics:

1
select * from pg_stat_all_indexes
Check the user functions statistics:

1
select * from pg_stat_user_functions

No comments:

Post a Comment

Master and Slave - Sync check - PostgreSQL

  1) Run the below Query on Primary:- SELECT     pid,     usename,     application_name,     client_addr,     state,     sync_state,     sen...