From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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-16 14:58:12 |
Message-ID: | eeddc868-eb64-838c-3336-0a32e7ad4e4a@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 8/11/16 8:45 AM, Tom Lane wrote:
> Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> writes:
>> 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.
>
> What were you doing to "get ten keys out"? If those were ten separate
> JSON operators, they'd likely have done ten separate decompressions.
> You'd have saved something by having the TOAST data already fetched into
> shared buffers, but it'd still hardly be free.
Multiple -> or ->> operators, but all operating on the same field (which
I thought would mean a single datum that would end up detoasted?).
Some of these would have been nested ->/->>. In essence, this was a set
of nested views that ultimately pulled from a single JSONB field.
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-08-16 15:19:21 | Re: Jsonb extraction very slow |
Previous Message | Jim Nasby | 2016-08-16 14:54:12 | Re: Any reasons for 'DO' statement not returning result? |