Re: Jsonb extraction very slow

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: hari(dot)prasath <hari(dot)prasath(at)zohocorp(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Jsonb extraction very slow
Date: 2016-08-11 13:08:00
Message-ID: ac044d8a-bddf-dd20-e96f-6b2ce8b250e8@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-08-11 13:45:52 Re: Jsonb extraction very slow
Previous Message Kevin Grittner 2016-08-11 12:34:37 Re: Serializable read and blocking