Re: Bool btree_gin index not chosen on equality contraint, but on greater/lower?

From: Patric Bechtel <patric(dot)bechtel(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bool btree_gin index not chosen on equality contraint, but on greater/lower?
Date: 2016-02-14 22:11:58
Message-ID: 56C0FBAE.9010606@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tom,

Tom Lane schrieb am 14.02.2016 um 17:51:
> Patric Bechtel <patric(dot)bechtel(at)gmail(dot)com> writes:
>> I tried to add bool support to the btree_gin contrib module, and as far as I can tell, it
>> seems to work (wasn't that complicated, actually). But now I'm stuck, as PostgreSQL doesn't
>> seem to like to use my new index, if I use equality or unequality, just with greater and
>> lower than.
>
> I think your problem is that the planner won't apply match_boolean_index_clause() or
> expand_boolean_index_clause(), because it has a hard-wired idea of which index opclasses could
> possibly benefit from that, cf IsBooleanOpfamily().

oh, sh*t...

My motivation was the size of the bool indexes; they are tiny and really fast. It feels almost
like bitmap indexes.

I hope that's not too far over my head already... but I'll take a look.

If someone might give me a hint where to look, I'd be grateful.

Thanks a lot for the hint,

Patric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: GnuPT 2.5.2

iEYEARECAAYFAlbA+64ACgkQfGgGu8y7ypCfVwCg81dCY9Mv70+2dk8e3+5xChyO
C7cAn1fRV3NAosi0W3IisKNEmS9K9hZE
=Xd+r
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-02-14 22:26:23 Re: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl
Previous Message Tom Lane 2016-02-14 22:05:04 Re: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl