Skip to content

Instantly share code, notes, and snippets.

@dalen
Last active December 19, 2015 12:39
Show Gist options
  • Save dalen/5956442 to your computer and use it in GitHub Desktop.
Save dalen/5956442 to your computer and use it in GitHub Desktop.
puppetdb=# select * from pg_statio_all_tables where schemaname='public';
relid | schemaname | relname | heap_blks_read | heap_blks_hit | idx_blks_read | idx_blks_hit | toast_blks_read | toast_blks_hit | tidx_blks_read | tidx_blks_hit
-------+------------+-------------------------+----------------+---------------+---------------+--------------+-----------------+----------------+----------------+---------------
16455 | public | catalog_resources | 3342606866 | 9262119774 | 979685526 | 668733437342 | 0 | 0 | 0 | 0
16489 | public | schema_migrations | 7 | 31 | 14 | 41 | | | |
16552 | public | resource_events | 62059176 | 728183445 | 257889288 | 7405931285 | 47214 | 91996 | 983 | 215746
16539 | public | reports | 4749413 | 2476899515 | 7628596 | 959545559 | 0 | 0 | 0 | 0
16399 | public | catalogs | 28672 | 3930952586 | 22622 | 3923044205 | 0 | 0 | 0 | 0
16516 | public | certname_facts_metadata | 532 | 1766940439 | 9974 | 1720461723 | 0 | 0 | 0 | 0
16468 | public | resource_params | 3087814 | 144842043 | 460130 | 2703478415 | 32269 | 81158 | 1085 | 81230
16496 | public | certname_facts | 102745 | 6554351931 | 76498678 | 9701246696 | 7503 | 1352877 | 2092 | 586334
16476 | public | edges | 121667960 | 3915177564 | 353954514 | 6283338177 | 0 | 0 | 0 | 0
16391 | public | certnames | 448 | 212677843 | 2321 | 184103291 | 0 | 0 | 0 | 0
16407 | public | certname_catalogs | 738 | 193460590 | 3971 | 169275531 | 0 | 0 | 0 | 0
(11 rows)
puppetdb=# select * from pg_statio_all_indexes where schemaname='public' order by idx_blks_read desc;
relid | indexrelid | schemaname | relname | indexrelname | idx_blks_read | idx_blks_hit
-------+------------+------------+-------------------------+-----------------------------------------+---------------+--------------
16476 | 16482 | public | edges | edges_pkey | 353955260 | 6283470194
16455 | 16538 | public | catalog_resources | idx_catalog_resources_tags_gin | 291823618 | 646924252242
16455 | 16514 | public | catalog_resources | idx_catalog_resources_resource | 208585921 | 4419896886
16455 | 16461 | public | catalog_resources | catalog_resources_pkey | 172023928 | 3848247587
16455 | 16537 | public | catalog_resources | idx_catalog_resources_type_title | 160416060 | 3837046753
16552 | 16569 | public | resource_events | idx_resource_events_resource_type_title | 136523098 | 1150759748
16455 | 16536 | public | catalog_resources | idx_catalog_resources_catalog | 101559170 | 4149566374
16552 | 16558 | public | resource_events | constraint_resource_events_unique | 55348019 | 1229847874
16496 | 16512 | public | certname_facts | idx_certname_facts_name | 54213958 | 3036628460
16455 | 16513 | public | catalog_resources | idx_catalog_resources_type | 45278665 | 5554973216
16552 | 16567 | public | resource_events | idx_resource_events_report | 37226173 | 1294005876
16496 | 16511 | public | certname_facts | idx_certname_facts_certname | 18896162 | 3706564720
16552 | 16568 | public | resource_events | idx_resource_events_resource_type | 9830880 | 1367966439
16552 | 16570 | public | resource_events | idx_resource_events_timestamp | 9826803 | 950320970
16552 | 19873 | public | resource_events | idx_resource_events_status | 9135079 | 1413118062
16539 | 16565 | public | reports | idx_reports_certname | 4439610 | 22332462
16496 | 16502 | public | certname_facts | certname_facts_pkey | 3389470 | 2958444046
16539 | 16545 | public | reports | reports_pkey | 2865824 | 918499622
16468 | 16474 | public | resource_params | resource_params_pkey | 349667 | 2472186765
16539 | 16566 | public | reports | idx_reports_end_time | 323511 | 18727671
16468 | 16509 | public | resource_params | idx_resources_params_resource | 76133 | 229141400
16468 | 16510 | public | resource_params | idx_resources_params_name | 34344 | 2210862
16399 | 16405 | public | catalogs | catalogs_pkey | 21528 | 1881873
16516 | 16522 | public | certname_facts_metadata | certname_facts_metadata_pkey | 7567 | 21635695
16516 | 16524 | public | certname_facts_metadata | certname_facts_metadata_certname_key | 2407 | 1698885868
16391 | 16397 | public | certnames | certnames_pkey | 2321 | 184108567
16407 | 16413 | public | certname_catalogs | certname_catalogs_pkey | 1930 | 12927409
16399 | 16494 | public | catalogs | idx_catalogs_hash | 1101 | 3921251904
16407 | 16415 | public | certname_catalogs | certname_catalogs_certname_key | 717 | 10798768
16407 | 16495 | public | certname_catalogs | idx_certname_catalogs_certname | 676 | 39240137
16407 | 16417 | public | certname_catalogs | certname_catalogs_catalog_key | 648 | 106313363
16489 | 16492 | public | schema_migrations | schema_migrations_pkey | 14 | 41
(32 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment