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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Дата
Msg-id 20140509033405.GA23254@momjian.us
обсуждение исходный текст
Ответ на Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-hackers
On Thu, May  8, 2014 at 06:39:11PM -0400, Tom Lane wrote:
> I wrote:
> > I think the idea of hashing only keys/values that are "too long" is a
> > reasonable compromise.  I've not finished coding it (because I keep
> > getting distracted by other problems in the code :-() but it does not
> > look to be very difficult.  I'm envisioning the cutoff as being something
> > like 128 bytes; in practice that would mean that few if any keys get
> > hashed, I think.
> 
> Attached is a draft patch for this.  In addition to the hash logic per se,
> I made these changes:
> 
> * Replaced the K/V prefix bytes with a code that distinguishes the types
> of JSON values.  While this is not of any huge significance for the
> current index search operators, it's basically free to store the info,
> so I think we should do it for possible future use.
> 
> * Fixed the problem with "exists" returning rows it shouldn't.  I
> concluded that the best fix is just to force recheck for exists, which
> allows considerable simplification in the consistent functions.
> 
> * Tried to improve the comments in jsonb_gin.c.
> 
> Barring objections I'll commit this tomorrow, and also try to improve the
> user-facing documentation about the jsonb opclasses.

Looks good.  I was thinking the jsonb_ops name could remain unchanged
and the jsonb_hash_ops could be called jsonb_combo_ops as it combines
the key and value into a single index entry.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [v9.5] Custom Plan API
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [WIP] showing index maintenance on EXPLAIN