Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Date: 2014-04-08 22:18:31
Message-ID: 534475B7.6020908@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers


On 04/08/2014 05:57 PM, Peter Geoghegan wrote:
> On Tue, Apr 8, 2014 at 2:46 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Well, let me see if I understand the situation correctly:
>>
>> * jsonb_ops supports more operators
>>
>> * jsonb_hash_ops produces smaller, better-performing indexes
>>
>> * jsonb_ops falls over on inputs with wide field values, but
>> jsonb_hash_ops does not
> There might be some compelling cases for indexing existence rather
> than containment, since the recheck flag isn't set there, but in
> general this summary seems sound. I would say that broadly, existence
> is a less useful operator than containment, and so jsonb_hash_ops is
> broadly more compelling. I didn't propose changing the default due to
> concerns about the POLA, but I'm happy to be told that those concerns
> were out of proportion to the practical benefits of a different
> default.
>

I tend to agree with Tom that POLA will be more violated by the default
ops class not being able to index some values.

cheers

andrew

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2014-04-09 02:48:32 Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Previous Message Peter Geoghegan 2014-04-08 21:57:44 Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-04-08 22:21:06 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Oleg Bartunov 2014-04-08 22:09:24 Re: Default gin operator class of jsonb failing with index row size maximum reached