Skip to content

Instantly share code, notes, and snippets.

@gerep
Created June 7, 2017 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerep/3c0c6c4b8d9a24b90e433215e48011d8 to your computer and use it in GitHub Desktop.
Save gerep/3c0c6c4b8d9a24b90e433215e48011d8 to your computer and use it in GitHub Desktop.
Some PG commands
Last Vaccum: select * from pg_stat_all_tables;
Dead tuples: select relname, n_dead_tup, last_vacuum, last_autovacuum from pg_catalog.pg_stat_all_tables where n_dead_tup > 0 and relname = 'precificacao_campanha' order by n_dead_tup desc;
Run Vaccum: VACUUM FULL VERBOSE precificacao;
set search_path to pricing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment