forcing use of more indexes (bitmap AND)

From: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: forcing use of more indexes (bitmap AND)
Date: 2008-03-14 06:28:15
Message-ID: 1205476095.354.29.camel@neuromancer.home.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

query is something like this

Select *
from v_test
where acode Like 'PC%'
and rev = '0Q'
and hcm = '1'
and mcm = 'K'

where acode, rev, hcm, mcm are all indexes.

Currently this query is only using the rev and mcm for the bitmapAND.
it then does a bitmap heap scan using the acode and the hcm indexes.

I would like to try to see if forcing the planner to favour heavier usage of the indexes would yield faster results.

I've tried lowering random_page_cost(default 4) down to 2 with no change in planner.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2008-03-14 06:35:25 Re: tsearch2 word separators
Previous Message Scott Marlowe 2008-03-14 06:14:48 Re: Can't rename an existnig DB because it doesn't exist???