Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 7391663351E for ; Sun, 5 Apr 2009 22:33:20 -0300 (ADT) 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 22926-07 for ; Sun, 5 Apr 2009 22:33:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 2E6EB63320D for ; Sun, 5 Apr 2009 22:33:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n361XHD3007373; Sun, 5 Apr 2009 21:33:17 -0400 (EDT) To: "Rainer Mager" cc: pgsql-performance@postgresql.org Subject: Re: difficulties with time based queries In-reply-to: <003501c9b656$a9c73fe0$fd55bfa0$@com> References: <003001c9b645$e8a7cec0$b9f76c40$@com> <003501c9b656$a9c73fe0$fd55bfa0$@com> Comments: In-reply-to "Rainer Mager" message dated "Mon, 06 Apr 2009 10:26:08 +0900" Date: Sun, 05 Apr 2009 21:33:17 -0400 Message-ID: <7371.1238981597@sss.pgh.pa.us> From: Tom Lane 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: 200904/114 X-Sequence-Number: 33481 "Rainer Mager" writes: >> From: Tom Lane [mailto:tgl@sss.pgh.pa.us] >> Hmm ... it's pretty unusual to see the index fetch portion of a bitmap >> scan take the bulk of the runtime. Usually that part is fast and where >> the pain comes is in fetching from the heap. I wonder whether that >> index has become bloated. How big are the table and the index >> physically? (Look at pg_class.relpages, or if you want a really >> accurate number try pg_relation_size().) > Can you give me some more info on how to look at these stats? Since you've got 8.3 it's easy: select pg_relation_size('tablename') (or indexname). The result is in bytes, so you might want to divide by 1K or 1M to keep the number readable. regards, tom lane