to find table stats for last update time.

From: Shabala Deshpande <de(dot)shabala(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: to find table stats for last update time.
Date: 2010-01-05 09:25:43
Message-ID: 16b7e2641001050125i64d6f815j29350ab640abc7eb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

Is there any way to find out the most recent update time for a table in
postgres like the mysql equivalent :

mysql> SHOW TABLE STATUS LIKE 'XXXX';
+--------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-------------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length
| Data_length | Max_data_length | Index_length | Data_free | Auto_increment
| Create_time | Update_time | Check_time |
Collation | Checksum | Create_options | Comment |
+--------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-------------------+----------+----------------+---------+
| XXXX | MyISAM | 9 | Compressed | 0 | 0 | 60
| 4294967295 | 1024 | 0 | NULL | 2010-01-01
23:50:01 | 2010-01-05 00:59:17 | 2010-01-05 00:59:17 | latin1_swedish_ci
| 0 | | |
+--------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-------------------+----------+----------------+---------+
1 row in set (0.00 sec)

In Mysql the Update_time field tells the most recent time at which the table
XXXX was updated.

I need to figure out the way to check whether the table is active
insertions/updates in last 15 mins?

Any way out??

Thanks and Regards,

Shabala Deshpande.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A. Kretschmer 2010-01-05 09:33:41 Re: to find table stats for last update time.
Previous Message Susan M Farley 2010-01-04 00:29:15 How to create a Java function in PostgreSQL