On Wed, Jan 30, 2019 at 6:06 PM Saul, Jean Paolo
<paolo.saul@verizonconnect.com> wrote:
> I am testing your comment about low cardinality indexes, and changed my inserted values.
>
> for integers: (RANDOM()*10)::INT % 2
> for text: MD5(((RANDOM()*10)::INT % 2)::TEXT)
>
> The latest results show that text and integer indexes now behave poorly like the boolean index.
> The performance hit is visibly disappointing compared to versions prior to PG10.
FWIW, I cannot recreate this. I still have no reason to believe that
this problem with low cardinality indexes would be any worse on more
recent versions.
BTW, I think that you'll find that hash indexes don't do as well as
B-Tree indexes with lots of duplicates when reading.
--
Peter Geoghegan