From karthikeyan.shan@wipro.com Tue Mar 6 16:50:37 2001 Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f26Gobx33386 for ; Tue, 6 Mar 2001 11:50:37 -0500 (EST) (envelope-from pgsql-admin-owner@postgresql.org) Received: from suraksha.wipro.com (suraksha.wipsys.soft.net [202.54.69.9] (may be forged)) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f25Bgdx74073 for ; Mon, 5 Mar 2001 06:42:40 -0500 (EST) (envelope-from karthikeyan.shan@wipro.com) Received: by suraksha.wipro.com (8.8.8+Sun/SMI-SVR4) id RAA26441; Mon, 5 Mar 2001 17:06:37 +0530 (IST) Received: from cdcvwall(192.168.160.23) by suraksha via smap (V2.0) id xma026436; Mon, 5 Mar 01 17:06:25 +0530 Received: from wipro.com ([10.145.2.170]) by bhairavi.mail.wipro.com (Netscape Messaging Server 3.6) with ESMTP id AAA4447 for ; Mon, 5 Mar 2001 17:00:40 +0530 Message-ID: <3AA37B76.496A72B8@wipro.com> Date: Mon, 05 Mar 2001 17:11:42 +0530 From: "Karthikeyan Shanmuganathan" X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Table Size Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/46 X-Sequence-Number: 890 Dear Sir, I would like to know how can I find the size of a table in Oracle. regards, Karthik.S. From ssrai@ismartpanache.com Thu Jun 14 13:02:26 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D990C9FBF14 for ; Thu, 14 Jun 2007 10:02:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 19060-03-2 for ; Thu, 14 Jun 2007 10:02:12 -0300 (ADT) X-Greylist: delayed 00:23:02.723558 by SQLgrey-1.7.5 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A59709FBD93 for ; Thu, 14 Jun 2007 10:02:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from smtpauth01.csee.onr.siteprotect.com (smtpauth01.csee.onr.siteprotect.com [64.26.60.145]) by svr4.postgresql.org (Postfix) with ESMTP id 1F90F5AF89E for ; Thu, 14 Jun 2007 12:39:13 +0000 (GMT) Received: from lsharmapc01 (unknown [220.227.154.90]) (Authenticated sender: ssrai@ismartpanache.com) by smtpauth01.csee.onr.siteprotect.com (Postfix) with ESMTP id 045191C8026 for ; Thu, 14 Jun 2007 07:30:29 -0500 (CDT) From: "Shyam Sunder Rai" To: Subject: Table size Date: Thu, 14 Jun 2007 18:10:15 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01C7AEAF.44178390" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AceugSiJmyJ5rIaSTue0JR+vTt/c+A== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Message-Id: <20070614123030.045191C8026@smtpauth01.csee.onr.siteprotect.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.115 tagged_above=0 required=5 tests=BAYES_50=0.001, HTML_90_100=0.113, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200706/111 X-Sequence-Number: 25779 This is a multi-part message in MIME format. ------=_NextPart_000_0025_01C7AEAF.44178390 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, How can I calculate a table size in postgres ? Help please.. Regards, Shyam Sunder Rai ------=_NextPart_000_0025_01C7AEAF.44178390 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

How can I calculate a table size in postgres ? =

 

Help please..

 

 

Regards,

Shyam Sunder Rai

 

------=_NextPart_000_0025_01C7AEAF.44178390-- From adsmail@wars-nicht.de Thu Jun 14 13:16:25 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 37D339FBDAF for ; Thu, 14 Jun 2007 10:16:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 98863-10 for ; Thu, 14 Jun 2007 10:16:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from base.wars-nicht.de (wars-nicht.de [213.239.199.195]) by postgresql.org (Postfix) with ESMTP id 262E59FB9EA for ; Thu, 14 Jun 2007 10:16:21 -0300 (ADT) Received: from iridium.wars-nicht.de (Qe44f.q.pppool.de [89.53.228.79]) by base.wars-nicht.de (Postfix) with SMTP id D757A784285 for ; Thu, 14 Jun 2007 15:16:16 +0200 (CEST) Date: Thu, 14 Jun 2007 15:16:15 +0200 From: Andreas 'ads' Scherbaum To: pgsql-admin@postgresql.org Subject: Re: Table size Message-Id: <20070614151615.ef78a633.adsmail@wars-nicht.de> In-Reply-To: <20070614123030.045191C8026@smtpauth01.csee.onr.siteprotect.com> References: <20070614123030.045191C8026@smtpauth01.csee.onr.siteprotect.com> X-Mailer: Sylpheed version 2.2.6 (GTK+ 2.6.4; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.173 tagged_above=0 required=5 tests=AWL=0.037, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/112 X-Sequence-Number: 25780 Hello, On Thu, 14 Jun 2007 18:10:15 +0530 Shyam Sunder Rai wrote: > How can I calculate a table size in postgres ? thats in the docu: Docu -> The SQL Language -> Functions and Operators -> System Administration Functions http://www.postgresql.org/docs/8.2/interactive/functions-admin.html Kind regards -- Andreas 'ads' Scherbaum Failure is not an option. It comes bundled with your Microsoft product. (Ferenc Mantfeld) From mike@fuhr.org Thu Jun 14 13:16:31 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F3B729FB9EA for ; Thu, 14 Jun 2007 10:16:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 21396-02 for ; Thu, 14 Jun 2007 10:16:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 90B879FBDAF for ; Thu, 14 Jun 2007 10:16:27 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l5EDGLZb004524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Jun 2007 07:16:24 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l5EDGLFd070261; Thu, 14 Jun 2007 07:16:21 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l5EDGLSZ070260; Thu, 14 Jun 2007 07:16:21 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 14 Jun 2007 07:16:21 -0600 From: Michael Fuhr To: Shyam Sunder Rai Cc: pgsql-admin@postgresql.org Subject: Re: Table size Message-ID: <20070614131621.GA70209@winnie.fuhr.org> References: <20070614123030.045191C8026@smtpauth01.csee.onr.siteprotect.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070614123030.045191C8026@smtpauth01.csee.onr.siteprotect.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/113 X-Sequence-Number: 25781 On Thu, Jun 14, 2007 at 06:10:15PM +0530, Shyam Sunder Rai wrote: > How can I calculate a table size in postgres ? To find the size of an existing table use pg_relation_size() or pg_total_relation_size() (8.1 and later; in earlier versions use the functions in contrib/dbsize). http://www.postgresql.org/docs/8.2/interactive/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE Or did you want to estimate the size of a table given the number and types of its columns and the number of rows? -- Michael Fuhr From decibel@decibel.org Tue Jun 19 11:20:15 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 2FF259FB72F for ; Tue, 19 Jun 2007 08:20:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 29057-04 for ; Tue, 19 Jun 2007 08:20:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id EC2E39FB70E for ; Tue, 19 Jun 2007 08:20:09 -0300 (ADT) Received: from [192.168.1.134] (unknown [64.9.19.254]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTP id 56A7356445; Tue, 19 Jun 2007 06:20:08 -0500 (CDT) In-Reply-To: <20070614131621.GA70209@winnie.fuhr.org> References: <20070614123030.045191C8026@smtpauth01.csee.onr.siteprotect.com> <20070614131621.GA70209@winnie.fuhr.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Shyam Sunder Rai , pgsql-admin@postgresql.org Content-Transfer-Encoding: 7bit From: Jim Nasby Subject: Re: Table size Date: Mon, 18 Jun 2007 17:18:54 -0500 To: Michael Fuhr X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.322 tagged_above=0 required=5 tests=AWL=0.185, BAYES_05=-1.11, DATE_IN_PAST_12_24=1.247 X-Spam-Level: X-Archive-Number: 200706/161 X-Sequence-Number: 25829 On Jun 14, 2007, at 8:16 AM, Michael Fuhr wrote: > On Thu, Jun 14, 2007 at 06:10:15PM +0530, Shyam Sunder Rai wrote: >> How can I calculate a table size in postgres ? > > To find the size of an existing table use pg_relation_size() or > pg_total_relation_size() (8.1 and later; in earlier versions use > the functions in contrib/dbsize). If you don't need an exact size, you can also look at pg_class.relpages, which is the size of a relation in pages. The relation_size functions actually read the size off the filesystem, which seems to be quite a bit slower if you're dealing with more than a few files. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)