From ahmostovoi@gmail.com Sat Sep 10 16:57:51 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3B0BBB5DC1E for ; Sat, 10 Sep 2011 13:57:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 87084-04 for ; Sat, 10 Sep 2011 16:57:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f46.google.com (mail-yw0-f46.google.com [209.85.213.46]) by mail.postgresql.org (Postfix) with ESMTP id 1E8A3B5DC19 for ; Sat, 10 Sep 2011 13:57:44 -0300 (ADT) Received: by ywf7 with SMTP id 7so2443309ywf.19 for ; Sat, 10 Sep 2011 09:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=n/eWl/PxcDtI7inKF+eCBdGZai2DoV4dSnYTXVmWo6c=; b=MmWXca1FIQLcAUrn2aqdYLFTM/6uRjMilA8ACaf2vbTa8mJ3VjhIgrEh0Ah891qlRr YiPvJS9MyQ0LKtdyXJZMnn/U8s083BQc9Xs/bS7TSkZX/R7WOnAbKTI2w2f1jnDAaYBv eXdH0qUPDtnQGHaLL7yXHi++izgEMpXGD7pMA= Received: by 10.236.168.68 with SMTP id j44mr18702333yhl.32.1315673864632; Sat, 10 Sep 2011 09:57:44 -0700 (PDT) Received: from [192.168.0.11] ([190.55.140.134]) by mx.google.com with ESMTPS id s42sm9817690yhs.0.2011.09.10.09.57.42 (version=SSLv3 cipher=OTHER); Sat, 10 Sep 2011 09:57:43 -0700 (PDT) Message-ID: <4E6B9703.6070101@gmail.com> Date: Sat, 10 Sep 2011 13:57:39 -0300 From: Alejandro User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Estimate physical index size Content-Type: multipart/alternative; boundary="------------010309070505020607060003" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201109/51 X-Sequence-Number: 38288 This is a multi-part message in MIME format. --------------010309070505020607060003 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi all, I need to know how to estimate physical index size. I can't find any formulas in online documentation. Could someone tell me where/what read? Thanks in advance Alejandro. --------------010309070505020607060003 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all,
    I need to know how to estimate physical index size. I can't find any formulas in online documentation.

    Could someone tell me where/what read?

Thanks in advance

Alejandro.
--------------010309070505020607060003-- From Kevin.Grittner@wicourts.gov Sun Sep 11 15:47:51 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9B49AB5DBC8 for ; Sun, 11 Sep 2011 12:47:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 52105-08 for ; Sun, 11 Sep 2011 15:47:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 112C1B5DBC5 for ; Sun, 11 Sep 2011 12:47:44 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Sun, 11 Sep 2011 10:47:43 -0500 Message-Id: <4E6C91CD02000025000410C0@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Sun, 11 Sep 2011 10:47:41 -0500 From: "Kevin Grittner" To: , Subject: Re: Estimate physical index size Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/56 X-Sequence-Number: 38293 Alejandro wrote: > I need to know how to estimate physical index size. I can't find > any formulas in online documentation. For an existing index you probably want pg_relation_size(): http://www.postgresql.org/docs/9.0/interactive/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE -Kevin From ahmostovoi@gmail.com Sun Sep 11 18:57:26 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E340FB5DBF2 for ; Sun, 11 Sep 2011 15:57:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 34141-02 for ; Sun, 11 Sep 2011 18:57:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f178.google.com (mail-gx0-f178.google.com [209.85.161.178]) by mail.postgresql.org (Postfix) with ESMTP id 60C76B5DBE1 for ; Sun, 11 Sep 2011 15:57:20 -0300 (ADT) Received: by gxk8 with SMTP id 8so3046431gxk.37 for ; Sun, 11 Sep 2011 11:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=za57YyXbfSbSzcMN2E44HMbaIm/7WuGzS3hqHafoaDY=; b=ZhnZ/dStWaKKCTKSNv+/fQB09U79oPWiREniHy1S1pX9Xxafb2VWuc69QPTJEbTddg tnGD2Nh3irrsN/noca16dSrSX7yEeOe3GrePssWSFjASNJvcl30k7wwt7jicPhpwAY+p yXtuIJZlA13iNRRSh4/8dLWpv2f3cVUyi+KIA= Received: by 10.236.179.103 with SMTP id g67mr5489610yhm.49.1315767438274; Sun, 11 Sep 2011 11:57:18 -0700 (PDT) Received: from [192.168.0.11] ([190.55.140.134]) by mx.google.com with ESMTPS id e2sm12116322yhh.10.2011.09.11.11.57.15 (version=SSLv3 cipher=OTHER); Sun, 11 Sep 2011 11:57:16 -0700 (PDT) Message-ID: <4E6D0484.2000201@gmail.com> Date: Sun, 11 Sep 2011 15:57:08 -0300 From: Alejandro User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org Subject: Re: Estimate physical index size References: <4E6C91CD02000025000410C0@gw.wicourts.gov> In-Reply-To: <4E6C91CD02000025000410C0@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201109/58 X-Sequence-Number: 38295 Kevin, thanks for reply. I need to estimate the entire database size (tables, indexes, etc.), prior to create it. I know how to calculate a table size, but I don't know how to calculate an index size. Thanks. Alejandro On 11/09/11 12:47, Kevin Grittner wrote: > Alejandro wrote: > >> I need to know how to estimate physical index size. I can't find >> any formulas in online documentation. > > For an existing index you probably want pg_relation_size(): > > http://www.postgresql.org/docs/9.0/interactive/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE > > -Kevin > >