dbTalk Databases Forums  

Finding out db size...

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Finding out db size... in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christopher.Becker@apcc.com
 
Posts: n/a

Default Finding out db size... - 04-30-2004 , 12:51 PM










Is there any possible way to do a SQL query to return some sort of
representation of how large the entire db is? Or even how large a single
table is?


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: Finding out db size... - 04-30-2004 , 12:59 PM







See the administration chapter of the docs on analyzing disk space.

Christopher.Becker (AT) apcc (DOT) com wrote:
Quote:



Is there any possible way to do a SQL query to return some sort of
representation of how large the entire db is? Or even how large a single
table is?


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
  #3  
Old   
Devrim GUNDUZ
 
Posts: n/a

Default Re: Finding out db size... - 04-30-2004 , 01:03 PM




Hi,

On Fri, 30 Apr 2004 Christopher.Becker (AT) apcc (DOT) com wrote:

Quote:
Is there any possible way to do a SQL query to return some sort of
representation of how large the entire db is? Or even how large a single
table is?
See contrib/dbsize

Regards,
--
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.TDMSoft.com
http://www.gunduz.org


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #4  
Old   
Adam Witney
 
Posts: n/a

Default Re: Finding out db size... - 04-30-2004 , 01:17 PM




If you install the dbsize extension in the contrib directory for the source
code, then you can run queries like this

SELECT database_size('my_database');
SELECT relation_size('my_table');

HTH

adam


Quote:
Is there any possible way to do a SQL query to return some sort of
representation of how large the entire db is? Or even how large a single
table is?


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.