Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 120869FC1D2 for ; Fri, 29 Jun 2007 13:09: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 21007-03 for ; Fri, 29 Jun 2007 13:09:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.emolecules.com (66-226-76-106.dedicated.abac.net [66.226.76.106]) by postgresql.org (Postfix) with ESMTP id E67449FC120 for ; Fri, 29 Jun 2007 13:09:21 -0300 (ADT) Received: (qmail 15205 invoked by uid 2020); 29 Jun 2007 09:09:20 -0700 Received: from wsip-68-224-174-233.sd.sd.cox.net (HELO ?192.168.0.3?) (68.224.174.233) by 192.168.0.4 with SMTP; 29 Jun 2007 09:09:20 -0700 Message-ID: <46852FD0.2030306@emolecules.com> Date: Fri, 29 Jun 2007 09:14:08 -0700 From: Craig James User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: "Dolafi, Tom" CC: Tom Lane , pgsql-performance@postgresql.org Subject: Re: rtree/gist index taking enormous amount of space in 8.2.3 References: <13616.1183046917@sss.pgh.pa.us> In-Reply-To: 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=0.423 tagged_above=0 required=5 tests=AWL=-0.028, BAYES_50=0.001, FORGED_RCVD_HELO=0.135, SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 200706/643 X-Sequence-Number: 25676 Dolafi, Tom wrote: > min(fmin) | max(fmin) | avg(fmin) > 1 | 55296469 | 11423945 > > min(fmax) | max(fmax) | avg(fmax) > 18 | 55553288 | 11424491 > > There are 5,704,211 rows in the table. When you're looking for weird index problems, it's more interesting to know if there are certain numbers that occur a LOT. From your statistics above, each number occurs about 10 times in the table. But do some particular numbers occur thousands, or even millions, of times? Here is a query that will print a list of the highest-occuring values. You might expect a few occurances of 20, and maybe 30, but if you have thousands or millions of occurances of certain numbers, then that can screw up an index. select fmax, c from (select fmax, count(fmax) as c from your_table group by fmax) as foo where c > 3 order by c desc; Craig