Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group