Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 74985B5DBCB for ; Wed, 14 Sep 2011 10:09:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 69717-07 for ; Wed, 14 Sep 2011 13:09:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mail.postgresql.org (Postfix) with ESMTP id EF7F4B5D91F for ; Wed, 14 Sep 2011 10:09:12 -0300 (ADT) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1R3pDF-0007QJ-2v for pgsql-performance@postgresql.org; Wed, 14 Sep 2011 06:09:13 -0700 Date: Wed, 14 Sep 2011 06:09:13 -0700 (PDT) From: MirrorX To: pgsql-performance@postgresql.org Message-ID: <1316005753084-4802699.post@n5.nabble.com> In-Reply-To: <1316004607207-4802634.post@n5.nabble.com> References: <1316004607207-4802634.post@n5.nabble.com> Subject: Re: cannot use multicolumn index MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.767 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201109/211 X-Sequence-Number: 44987 here is the explain analyze output-> server=# explain analyze select count(*) from temp_by_hour where xid > 100 and xdate > now() - interval '1 week'; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate (cost=29359311.58..29359311.59 rows=1 width=0) (actual time=2728061.589..2728061.590 rows=1 loops=1) -> Seq Scan on temp_by_hour (cost=0.00..29345234.14 rows=5630975 width=0) (actual time=560446.661..2726838.501 rows=5760724 loops=1) Filter: ((xid > 100) AND (xdate > (now() - '7 days'::interval))) Total runtime: 2728063.170 ms -- View this message in context: http://postgresql.1045698.n5.nabble.com/cannot-use-multicolumn-index-tp4802634p4802699.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com.