Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

check db size postgres code example

Example 1: how to get the size of the database in postgresql

SELECT pg_size_pretty( pg_database_size('dbname') );

Example 2: find size of all DB's postgres

CopySELECT pg_database.datname as "database_name", pg_database_size(pg_database.datname)/1024/1024 AS size_in_mb FROM pg_database ORDER by size_in_mb DESC;

Tags:

Sql Example

Related

remove accent in a string in R code example bash create directory code example powershell create junction code example nested if in javascript example colour picker chrome extension code example vscode flake8 linter ignore line length code example spl register autoload code example state function reactjs code example increasing image size in css code example jquery event on button click code example ionic change app name code example how to insert a new key in an array php code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy