Skip to content

Instantly share code, notes, and snippets.

@dalen
Last active December 19, 2015 12:39
Show Gist options
  • Save dalen/5956412 to your computer and use it in GitHub Desktop.
Save dalen/5956412 to your computer and use it in GitHub Desktop.
puppetdb=# select * from pg_stat_all_tables where schemaname='public';
relid | schemaname | relname | seq_scan | seq_tup_read | idx_scan | idx_tup_fetch | n_tup_ins | n_tup_upd | n_tup_del | n_tup_hot_upd | n_live_tup | n_dead_tup | last_vacuum | last_autovacuum | last_analyze | last_autoanalyze | vacuum_count | autovacuum_count | analyze_count | autoanalyze_count
-------+------------+-------------------------+----------+--------------+------------+---------------+------------+-----------+------------+---------------+------------+------------+-------------+-------------------------------+--------------+-------------------------------+--------------+------------------+---------------+-------------------
16455 | public | catalog_resources | 9122 | 39959606875 | 35291772 | 7313691435 | 809557259 | 0 | 802674911 | 0 | 5781907 | 1013101 | | 2013-07-08 22:33:51.260409+00 | | 2013-07-09 10:17:11.519939+00 | 0 | 451 | 0 | 1340
16496 | public | certname_facts | 94935 | 41177032918 | 137140256 | 22394324525 | 838022326 | 0 | 837054693 | 0 | 547501 | 10012 | | 2013-07-09 10:35:41.849117+00 | | 2013-07-09 10:34:21.15168+00 | 0 | 8508 | 0 | 26537
16476 | public | edges | 1 | 0 | 487007 | 1128473065 | 1136237047 | 0 | 1128473065 | 0 | 7725115 | 1369328 | | 2013-07-08 22:06:58.080045+00 | | 2013-07-09 10:21:23.93517+00 | 0 | 530 | 0 | 1748
16552 | public | resource_events | 47 | 2928794571 | 2554909 | 330940577 | 240671715 | 0 | 133222380 | 0 | 69372826 | 16575578 | | 2013-07-06 22:55:14.843297+00 | | 2013-07-08 12:11:14.849544+00 | 0 | 7 | 0 | 114
16489 | public | schema_migrations | 1 | 0 | 27 | 269 | 11 | 0 | 0 | 0 | 11 | 0 | | | | | 0 | 0 | 0 | 0
16399 | public | catalogs | 354085 | 42213441 | 1959745621 | 1959250192 | 490899 | 4435951 | 487007 | 4431330 | 3124 | 653 | | 2013-07-09 10:26:43.339121+00 | | 2013-07-09 10:32:20.433637+00 | 0 | 6377 | 0 | 12464
16539 | public | reports | 802 | 14267978 | 243707490 | 2193208804 | 4351847 | 0 | 2550875 | 0 | 1647727 | 3957 | | 2013-07-09 09:03:34.947004+00 | | 2013-07-08 23:53:56.384268+00 | 0 | 7 | 0 | 106
16391 | public | certnames | 757757 | 2009695972 | 91294652 | 91290102 | 5969 | 14409797 | 2631 | 14401320 | 2705 | 186 | | 2013-07-09 10:35:41.904967+00 | | 2013-07-09 10:35:41.932814+00 | 0 | 18129 | 0 | 28137
16516 | public | certname_facts_metadata | 493743 | 1310355903 | 848768326 | 848763061 | 5168966 | 0 | 5124444 | 0 | 2705 | 8 | | 2013-07-09 10:36:22.662447+00 | | 2013-07-09 10:35:20.368653+00 | 0 | 8131 | 0 | 25547
16407 | public | certname_catalogs | 1276009 | 3384836084 | 61302592 | 57587795 | 4929917 | 0 | 4927215 | 0 | 2704 | 11 | | 2013-07-09 10:36:22.500397+00 | | 2013-07-09 10:35:20.31553+00 | 0 | 6136 | 0 | 23293
16468 | public | resource_params | 1758 | 258996956 | 849203183 | 3469710380 | 741190 | 0 | 519264 | 0 | 210975 | 39044 | | 2013-07-04 00:53:52.982916+00 | | 2013-07-08 09:14:44.414647+00 | 0 | 10 | 0 | 53
(11 rows)
puppetdb=# select * from pg_stat_all_indexes where schemaname='public';
relid | indexrelid | schemaname | relname | indexrelname | idx_scan | idx_tup_read | idx_tup_fetch
-------+------------+------------+-------------------------+-----------------------------------------+------------+--------------+---------------
16391 | 16397 | public | certnames | certnames_pkey | 91296676 | 91311430 | 91292126
16399 | 16405 | public | catalogs | catalogs_pkey | 85 | 9 | 0
16407 | 16413 | public | certname_catalogs | certname_catalogs_pkey | 12 | 12 | 12
16407 | 16415 | public | certname_catalogs | certname_catalogs_certname_key | 0 | 0 | 0
16407 | 16417 | public | certname_catalogs | certname_catalogs_catalog_key | 47132897 | 43791796 | 43428431
16455 | 16461 | public | catalog_resources | catalog_resources_pkey | 0 | 0 | 0
16468 | 16474 | public | resource_params | resource_params_pkey | 777937691 | 3183853035 | 211764
16476 | 16482 | public | edges | edges_pkey | 487007 | 1128671193 | 0
16489 | 16492 | public | schema_migrations | schema_migrations_pkey | 27 | 269 | 269
16399 | 16494 | public | catalogs | idx_catalogs_hash | 1959783403 | 1959304557 | 1959288050
16407 | 16495 | public | certname_catalogs | idx_certname_catalogs_certname | 14170673 | 14250874 | 14160292
16496 | 16502 | public | certname_facts | certname_facts_pkey | 2382688 | 2422695 | 2348839
16468 | 16509 | public | resource_params | idx_resources_params_resource | 71281469 | 286972056 | 1800040
16468 | 16510 | public | resource_params | idx_resources_params_name | 10 | 5534 | 0
16496 | 16511 | public | certname_facts | idx_certname_facts_certname | 134380677 | 23904539988 | 3019049
16496 | 16512 | public | certname_facts | idx_certname_facts_name | 382688 | 1006105214 | 7
16455 | 16513 | public | catalog_resources | idx_catalog_resources_type | 855430 | 161308049715 | 0
16455 | 16514 | public | catalog_resources | idx_catalog_resources_resource | 27270095 | 36701181 | 27224298
16516 | 16522 | public | certname_facts_metadata | certname_facts_metadata_pkey | 5124690 | 5124470 | 5124464
16516 | 16524 | public | certname_facts_metadata | certname_facts_metadata_certname_key | 843667725 | 843744812 | 843662686
16455 | 16536 | public | catalog_resources | idx_catalog_resources_catalog | 5537268 | 913622639 | 8590060
16455 | 16537 | public | catalog_resources | idx_catalog_resources_type_title | 773263 | 10290805 | 10234115
16455 | 16538 | public | catalog_resources | idx_catalog_resources_tags_gin | 855931 | 7702784019 | 0
16539 | 16545 | public | reports | reports_pkey | 241698572 | 241699262 | 241699261
16552 | 16558 | public | resource_events | constraint_resource_events_unique | 2 | 40002 | 40002
16539 | 16565 | public | reports | idx_reports_certname | 1257927 | 733916907 | 3496
16539 | 16566 | public | reports | idx_reports_end_time | 758923 | 1293243866 | 1278007570
16552 | 16567 | public | resource_events | idx_resource_events_report | 2554121 | 133262714 | 20737
16552 | 16568 | public | resource_events | idx_resource_events_resource_type | 0 | 0 | 0
16552 | 16569 | public | resource_events | idx_resource_events_resource_type_title | 0 | 0 | 0
16552 | 16570 | public | resource_events | idx_resource_events_timestamp | 776 | 195669061 | 136371514
16552 | 19873 | public | resource_events | idx_resource_events_status | 10 | 2368252 | 1
(32 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment