Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 708542E003C for ; Mon, 7 Apr 2008 05:15:57 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 49134-06 for ; Mon, 7 Apr 2008 05:15:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from wdscexfe01.sc.wdc.com (wdscexfe01.sc.wdc.com [129.253.170.53]) by developer.postgresql.org (Postfix) with ESMTP id AF4AD2E0038 for ; Mon, 7 Apr 2008 05:15:54 -0300 (ADT) Received: from wdmyexbe03.my.asia.wdc.com ([129.253.105.55]) by wdscexfe01.sc.wdc.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Apr 2008 01:15:36 -0700 Received: from 129.253.107.176 ([129.253.107.176]) by wdmyexbe03.my.asia.wdc.com ([129.253.105.55]) with Microsoft Exchange Server HTTP-DAV ; Mon, 7 Apr 2008 08:15:32 +0000 Received: from neuromancer by 129.253.105.55; 07 Apr 2008 16:15:51 +0800 Subject: Forcing more agressive index scans for BITMAP AND From: Ow Mun Heng To: pgsql-performance@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 07 Apr 2008 16:15:51 +0800 Message-Id: <1207556151.19677.2.camel@neuromancer.home.net> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 X-OriginalArrivalTime: 07 Apr 2008 08:15:37.0196 (UTC) FILETIME=[8F4882C0:01C89887] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/51 X-Sequence-Number: 29544 just wondering if there's a special tweak i can do to force more usage of indexes to do BITMAP ands? I have a table like A int B int C int D int E int F int g int where A/B/C/D/E are indexes There's ~20millions rows in the table. Query are something like this. select * from table where A=X and B = Y and C = Z and D = AA and E = BB the query plan will only pick 2 indexes to do the bitmap. I'm not sure how to tweak the config for it to use more indexes. Box is a celeron 1.7 w/ 768MB ram with shared buffers at 250MB and effective cache size 350MB