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 > >