From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, "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 13:29:52 |
Message-ID: | CAHyXU0zBrUowa2C_LzeG7n-A3SOccs6KqCUWrzuN8rfg+oU=2A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Aug 11, 2016 at 8:45 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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.
Huh -- FWICT there is no way to pull N values from a jsonb with # of
items M for any value of N other than 1 or M with a single operation.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Ilya Kazakevich | 2016-08-16 13:29:54 | Re: schema advice for event stream with tagging and filtering |
Previous Message | Merlin Moncure | 2016-08-16 13:11:55 | Re: Any reasons for 'DO' statement not returning result? |