X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E81589DC986 for ; Sat, 4 Feb 2006 20:49:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77654-07 for ; Sat, 4 Feb 2006 20:49:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 99ABD9DC8A8 for ; Sat, 4 Feb 2006 20:49:03 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k150n5vF005057; Sat, 4 Feb 2006 19:49:05 -0500 (EST) To: "tschak" cc: pgsql-performance@postgresql.org Subject: Re: Index occupancy In-reply-to: <1138888981.186497.321210@z14g2000cwz.googlegroups.com> References: <1138888981.186497.321210@z14g2000cwz.googlegroups.com> Comments: In-reply-to "tschak" message dated "02 Feb 2006 06:03:01 -0800" Date: Sat, 04 Feb 2006 19:49:05 -0500 Message-ID: <5056.1139100545@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.104 required=5 tests=[AWL=0.104] X-Spam-Score: 0.104 X-Spam-Level: X-Archive-Number: 200602/45 X-Sequence-Number: 17031 "tschak" writes: > I have a question concerning the size of an index... > What I acually did was bulid a btree index on an smallint attribute > within a table with 10^8 rows. The table itself is app. 10GB large and > what I would like to have the smallest possible indeces. Unfortunately > the current size is about 2GB per indexed column (8 columns are indexed > in total) which is too large if the planner is supposed to choose a > bitmap scan between all of the indices. > So what I would like to know is the following: > Is there an easy way to tell postgres to occupy the index pages up to > 100 %? No, but even if there were it wouldn't make much of a difference. The minimum possible size of a PG index is about 16 bytes per entry, which would still put you at 1.6Gb for that many rows. regards, tom lane