Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3CA0264FD7D for ; Tue, 30 Dec 2008 10:43:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16586-03 for ; Tue, 30 Dec 2008 10:43:31 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mail.postgresql.org (Postfix) with ESMTP id 2D6ED64FF4F for ; Tue, 30 Dec 2008 10:43:30 -0400 (AST) Received: by bwz12 with SMTP id 12so14159565bwz.19 for ; Tue, 30 Dec 2008 06:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=gtY97kPYnAtbynM1H0zjw6x0AtIy9JnpaQK1cpL9IrQ=; b=vrZy5l2XdR77mbvrk6h1GEWxWT0697IcrH3Fese5eNIK1+JMaR2xbzVXFqcoIautFS Cu6BkAuxaBc8ewSW0xRy7O6hUZ8GMUQulyFcMFm8LNv8jkrLcrFcSnsSa80iHOkySSgR LgxCap7uYZPfyraMDtXCyAkZpBHF6GFvWcEr0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GVa7fPmomf03LcCQIYhTVNQY+Q8bQP0Z3GeONkGGNhDgGejMe23n4Na0aTttqI3Ul/ BZ9PVaobFqJBQE4i/0POHrpcs9ntn83lNCzQRSFfmHcoJ2u9cMFZ/wZL/OqZT9IQfz4W O0JS69rcUcC2XOcOp/8TVcO+CMZgqSpYY7htM= Received: by 10.223.112.201 with SMTP id x9mr10739040fap.69.1230648208603; Tue, 30 Dec 2008 06:43:28 -0800 (PST) Received: by 10.223.107.135 with HTTP; Tue, 30 Dec 2008 06:43:28 -0800 (PST) Message-ID: <603c8f070812300643n3bcc0454j2022d4efaa6122d5@mail.gmail.com> Date: Tue, 30 Dec 2008 09:43:28 -0500 From: "Robert Haas" To: "Laszlo Nagy" Subject: Re: Big index sizes Cc: "pgsql-performance@postgresql.org" In-Reply-To: <4959E477.9050700@shopzeus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4959E477.9050700@shopzeus.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/227 X-Sequence-Number: 32263 On Tue, Dec 30, 2008 at 4:05 AM, Laszlo Nagy wrote: > We have serveral table where the index size is much bigger than the table > size. You'll usually get index bloat in roughly the same measure that you get table bloat. If you always (auto)vacuum regularly, then the amount of bloat in your indexes probably reflects the amount of bloat that your tables typically accumulate between vacuums, so reindexing won't help much. The indexes will just re-bloat back to about the same point over the next vacuum cycle or two. On the other hand, if your table has shrunk considerably, or if you've just removed a lot of bloat by vacuuming, REINDEX is often warranted. It would be nice if the system could automatically notice and correct situations that currently require VACUUM FULL or REINDEX, but it doesn't. ...Robert