Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to get the size of the database in postgresql

SELECT pg_size_pretty( pg_database_size('dbname') );
Comment

postgres database sizes

/* For multiple databases */
select t1.datname AS db_name,  
       pg_size_pretty(pg_database_size(t1.datname)) as db_size
from pg_database t1
order by pg_database_size(t1.datname) desc;
Comment

postgresql size of database

SELECT pg_database_size('named_db');
SELECT pg_size_pretty(pg_database_size('named_db'));
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql workbench turn off safe mode 
Sql :: mysql create user with mysql_native_password 
Sql :: fatal error: libpq-fe.h: No such file or directory 
Sql :: oracle change nls_date_format permanently 
Sql :: brew restart mysql 
Sql :: mysql status 
Sql :: psql drop column 
Sql :: how to truncate table with foreign key constraint 
Sql :: Failed to stop mysqld.service: Unit mysqld.service not loaded. 
Sql :: mysql where column not integer 
Sql :: wordpress database add admin 
Sql :: SELECT list is not in GROUP BY clause 
Sql :: mysql dump all databases 
Sql :: Add 2 hours to current time in MySQL 
Sql :: sql server read uncommitted 
Sql :: mysql change database charset and collation 
Sql :: mysql find tables with column name 
Sql :: mysql add column if not exists 
Sql :: see mysql users ubuntu 
Sql :: wordpress change url in database 
Sql :: mysql select last 15 minutes 
Sql :: postgres change owner of schema 
Sql :: mysql import ignore errors 
Sql :: su: Authentication failure mysql 
Sql :: Check Table Exists 
Sql :: oracle wait 
Sql :: oracle cpu per session 
Sql :: mysql left join exists 
Sql :: how to check database username and password in postgresql 
Sql :: mysql add column default value 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =