Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 3D3082E0064 for ; Fri, 4 Apr 2008 03:03:29 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21281-07 for ; Fri, 4 Apr 2008 03:03:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from wdscexfe02.sc.wdc.com (wdscexfe02.sc.wdc.com [129.253.170.52]) by developer.postgresql.org (Postfix) with ESMTP id 2CA512E0056 for ; Fri, 4 Apr 2008 03:03:25 -0300 (ADT) Received: from wdmyexbe03.my.asia.wdc.com ([129.253.105.55]) by wdscexfe02.sc.wdc.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 3 Apr 2008 23:03:08 -0700 Received: from 129.253.108.88 ([129.253.108.88]) by wdmyexbe03.my.asia.wdc.com ([129.253.105.55]) with Microsoft Exchange Server HTTP-DAV ; Fri, 4 Apr 2008 06:03:05 +0000 Received: from neuromancer by 129.253.105.55; 04 Apr 2008 14:03:20 +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: Fri, 04 Apr 2008 11:39:43 +0800 Message-Id: <1207280383.28172.26.camel@neuromancer.home.net> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 X-OriginalArrivalTime: 04 Apr 2008 06:03:08.0813 (UTC) FILETIME=[8E7043D0:01C89619] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/42 X-Sequence-Number: 29535 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