How to check the size of table in postgresql - 在PostgreSQL 如何查詢資料庫Table大小

2024-05-05·
Chi Yau
Chi Yau
· 1 min read

之前介紹了如何查詢PostgreSQL資料庫大小
但是其實可能只是某幾個Table 佔用位置的大小會比較多
所以便找了一個 SQL Statement 來查詢Table 的大小

解法方法:

select pg_size_pretty(pg_table_size('[TABLE_NAME]'));

Query to check PostgreSQL table size
Query to check PostgreSQL table size

Hope you find it useful