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 :: reset ids in mysql 
Sql :: mysql set max connections 
Sql :: get database size mysql 
Sql :: change nls_date_format 
Sql :: postgresql find biggest table 
Sql :: insert column after column mysql 
Sql :: loading local data is disabled mysql 
Sql :: remove mysql from centos 7 
Sql :: forgot mysql root password stackoverflow 
Sql :: mysql find tables with name 
Sql :: oracle find unusable indexes 
Sql :: could not find driver (SQL: PRAGMA foreign_keys = ON;) 
Sql :: create database if not exists 
Sql :: postgresql db owner change 
Sql :: postgresql calculate age from birthdate 
Sql :: mysql database stopped xampp mac 
Sql :: liquibase alter column type / length 
Sql :: sql delete multiple ids 
Sql :: select users 
Sql :: wordpress database query change url 
Sql :: get the list of all tables in sql server 
Sql :: The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue. 
Sql :: oracle first day of last year 
Sql :: mysql server start 
Sql :: t-sql test if table exists 
Sql :: install mysqldump ubuntu 
Sql :: query to check cpu utilization in oracle database 
Sql :: mysql date diff in seconds 
Sql :: mysql set root password 
Sql :: mysql get count of rows 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =