Re: Jsonb extraction very slow - Mailing list pgsql-general

From Jim Nasby
Subject Re: Jsonb extraction very slow
Date
Msg-id ac044d8a-bddf-dd20-e96f-6b2ce8b250e8@BlueTreble.com
Whole thread Raw
In response to Jsonb extraction very slow  ("hari.prasath" <hari.prasath@zohocorp.com>)
Responses Re: Jsonb extraction very slow  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Please CC the list.

On 8/11/16 2:19 AM, hari.prasath wrote:
>>Actually I've done some testing with this and there is a *significant*
>>overhead in getting multiple keys from a large document. There's a
>>significant extra cost for the first key, but there's also a non-trivial
>>cost for every key after that.
>
> Why is it take some extra cost for the first key and less for keys after
> that.?
> Is there any specific reason for this.? if so please explain..

I never dug into why. As Tom posited, decompression might explain the
time to get a single key out. Getting 10 keys instead of just 1 wasn't
10x more expensive, but it was significantly more expensive than just
getting a single key.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


pgsql-general by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Serializable read and blocking
Next
From: Tom Lane
Date:
Subject: Re: Jsonb extraction very slow