Difference between revisions of "Vacuum"
Jump to navigation
Jump to search
(Created page with "# Postgres Vacuum ``` $ docker run --rm -d --name postgres postgres:10.1 6732b0b9c6245fe9f19dd58e9737e5102089814e4aa96b66217af28a1596f786 $ docker exec -it postgres bash ro...") |
|||
Line 1: | Line 1: | ||
+ | Show bloat | ||
+ | |||
+ | https://wiki.postgresql.org/wiki/Show_database_bloat | ||
+ | |||
+ | |||
# Postgres Vacuum | # Postgres Vacuum | ||
Revision as of 20:47, 19 April 2022
Show bloat
https://wiki.postgresql.org/wiki/Show_database_bloat
Postgres Vacuum
$ docker run --rm -d --name postgres postgres:10.1 6732b0b9c6245fe9f19dd58e9737e5102089814e4aa96b66217af28a1596f786 $ docker exec -it postgres bash root@6732b0b9c624:/# psql -Upostgres psql (10.1) Type "help" for help. postgres=# CREATE TABLE floor ( postgres(# name text, postgres(# type text postgres(# ); CREATE TABLE postgres=# vacuum floor; VACUUM postgres=# SELECT relname, last_vacuum, last_autovacuum FROM pg_stat_user_tables; relname | last_vacuum | last_autovacuum ---------+-------------------------------+----------------- floor | 2019-04-24 17:52:26.044697+00 | (1 row)