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 :: sql calculate working days between two dates excluding weekends and holidays 
Sql :: mysql store ip address 
Sql :: replace null in sql 
Sql :: mysql email validation 
Sql :: how to transfer pandas datafra,e to sqlite 
Sql :: greater than in mongodb query 
Sql :: import mysql dump command line 
Sql :: mysql isnull 
Sql :: read all columns of a table sql 
Sql :: mysql copy table to another table 
Sql :: phone no data type in sql server 
Sql :: mysql update with join 
Sql :: ValueError: A string literal cannot contain NUL (0x00) characters. 
Sql :: drop a recordin sql 
Sql :: sql remove decimal places 
Sql :: get column types SQL SERVER 
Sql :: how to install sql in anaconda 
Sql :: declaring variables in pl sql 
Sql :: update one column from another column in same table 
Sql :: SQL Greater Than or Equal to Operator 
Sql :: average sql 
Sql :: postgre alter table foreign key 
Sql :: sql reverse order of results 
Sql :: sql select where in 
Sql :: sort by mysql 
Sql :: check database sessions oracle 
Sql :: postgres 11 add primary key 
Sql :: export mysql db using command line 
Sql :: sql server select furst day of current year 
Sql :: open postgresql.conf 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =