Checking when the last time autovacuum/autoanalyze ran on tables in a schema:

9:40 AM


select schemaname, relname, last_autovacuum, last_autoanalyze from pg_stat_user_tables where schemaname = 'SCHEMA';
schema=# select schemaname, relname, last_autovacuum, last_autoanalyze from pg_stat_user_tables where schemaname = 'public';
 schemaname |          relname          |        last_autovacuum        |       last_autoanalyze        
------------+---------------------------+-------------------------------+-------------------------------
 public     | domains                   | 2011-06-18 12:30:30.026095+00 | 
 public     | projectcontents           |                               | 
 public     | resourcetype              | 2011-06-18 12:30:51.143071+00 | 
 public     | locks                     | 2011-08-09 21:35:21.409569+00 | 2011-08-09 21:37:18.362847+00
 public     | qol_defaults              | 2011-06-18 12:30:30.040456+00 | 
 public     | metadatasearchable        | 2011-07-06 20:04:01.184731+00 | 2011-07-31 09:50:47.436649+00
 public     | contacts                  |                               | 
 public     | volume                    | 2011-06-18 12:33:14.729689+00 | 
 public     | foldersbin                | 2011-08-09 08:20:34.095725+00 | 2011-08-09 21:19:18.0175+00
 public     | metadata                  | 2011-06-18 12:33:26.898616+00 | 2011-08-07 08:20:58.555571+00
 public     | groupmembers              |                               | 
 public     | sharerightsexternal       |                               | 
 public     | userstoresync             |                               | 
 public     | authorizationidtype       | 2011-06-18 12:30:30.039089+00 | 
 public     | folders                   | 2011-08-03 12:31:01.529881+00 | 2011-08-09 07:03:32.134822+00
 public     | domainauthorizationidtype | 2011-06-18 12:33:14.71857+00  | 
 public     | metadatatemp              | 2011-08-09 21:37:18.555587+00 | 2011-08-09 21:37:18.555587+00
 public     | qol_types                 | 2011-06-18 12:30:30.044539+00 | 
 public     | metadatadeletedfile       | 2011-06-18 12:30:30.02405+00  | 
 public     | globalrights              | 2011-06-18 12:33:14.716883+00 | 
 public     | files                     | 2011-06-16 21:09:18.565169+00 | 2011-08-06 20:42:40.152546+00
 public     | rights                    | 2011-06-18 12:32:59.72224+00  | 
 public     | defaults                  | 2011-06-18 12:33:14.734155+00 | 
 public     | userstemp                 |                               | 
 public     | metadataapp               | 2011-06-18 12:30:30.036352+00 | 
 public     | resource                  | 2011-06-18 12:32:28.833163+00 | 2011-08-06 13:23:15.754892+00
 public     | filesystemtemp            | 2011-08-07 02:00:49.747643+00 | 2011-08-07 01:56:46.4288+00
 public     | sharerights               |                               | 
 public     | filesbin                  | 2011-08-09 07:55:41.43247+00  | 2011-08-09 06:50:36.274835+00
 public     | filestodelete             |                               | 
 public     | groups                    | 2011-06-18 12:33:14.732451+00 | 
 public     | dbmigrationscript         | 2011-06-18 12:30:30.012964+00 | 
 public     | tempfileinfo              | 2011-08-08 17:03:30.00726+00  | 2011-08-09 14:28:05.965135+00
 public     | projects                  |                               | 
 public     | identificationtype        | 2011-06-18 12:30:30.028483+00 | 
 public     | users                     | 2011-08-09 09:25:49.122957+00 | 2011-08-08 18:26:02.729914+00

Listing running SQL statements

select procpid, current_query, xact_start, now() from pg_stat_activity where current_query != '<IDLE>';
schema=# select procpid, current_query, xact_start, now() from pg_stat_activity where current_query != '<IDLE>';
 procpid |                 current_query                |          xact_start           |             now              
---------+----------------------------------------------+-------------------------------+-------------------------------
   11659 | SELECT * FROM COMMIT_Delete_Action($1,$2)    | 2011-08-09 21:46:43.181002+00 | 2011-08-09 21:46:44.341935+00
   29711 | SELECT * FROM CAT_UserQuotaUsage($1,$2)      | 2011-08-09 21:46:43.999453+00 | 2011-08-09 21:46:44.341935+00
    7593 | SELECT * FROM CAT_UserQuotaUsage($1,$2)      | 2011-08-09 21:46:43.291332+00 | 2011-08-09 21:46:44.341935+00
   19118 | SELECT * FROM COMMIT_Delete_Action($1,$2)    | 2011-08-09 21:46:43.041697+00 | 2011-08-09 21:46:44.341935+00
    5327 | SELECT * FROM CAT_UserQuotaUsage($1,$2)      | 2011-08-09 21:46:43.291268+00 | 2011-08-09 21:46:44.341935+00
    5237 | SELECT * FROM CAT_InsertFile($1,$2,$3,$4,$5) | 2011-08-09 21:46:43.880546+00 | 2011-08-09 21:46:44.341935+00
   13029 | SELECT * FROM CAT_UserQuotaUsage($1,$2)      | 2011-08-09 21:46:42.241872+00 | 2011-08-09 21:46:44.341935+00
   13031 | SELECT * FROM CAT_InsertFile($1,$2,$3,$4,$5) | 2011-08-09 21:46:41.228879+00 | 2011-08-09 21:46:44.341935+00

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results