Skip to content

Instantly share code, notes, and snippets.

@sebawebber
Created July 27, 2016 12:59
Show Gist options
  • Select an option

  • Save sebawebber/f281ee0fe8f98de2cb6f23e0828ad8a8 to your computer and use it in GitHub Desktop.

Select an option

Save sebawebber/f281ee0fe8f98de2cb6f23e0828ad8a8 to your computer and use it in GitHub Desktop.
Lista o uso de IO para as tabelas de usuário
WITH settings AS (
SELECT setting::NUMERIC as block from pg_settings
WHERE name = 'block_size'
)
select
pg_size_pretty(heap_blks_read * settings.block ) as heap_blks_MB,
pg_size_pretty(idx_blks_hit * settings.block) as idx_blks_MB, *
from pg_statio_user_tables,settings;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment