Re: Abnormal JSON query performance

Поиск
Список
Период
Сортировка
Искать
От
David G. Johnston
Тема
Re: Abnormal JSON query performance
Дата
в 19:09:26
Msg-id
CAKFQuwbDmE6dNARcTru++PfrarFkPL1m2j8dBHm5PcHcJF+gvw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Abnormal JSON query performance 007reader@gmail.com
Re: Abnormal JSON query performance Pavel Stehule <pavel.stehule@gmail.com>
Re: Abnormal JSON query performance 007reader <007reader@gmail.com>
Re: Abnormal JSON query performance Pavel Stehule <pavel.stehule@gmail.com>
Re: Abnormal JSON query performance 007reader@gmail.com
Re: Abnormal JSON query performance Pavel Stehule <pavel.stehule@gmail.com>
Re: Abnormal JSON query performance 007reader@gmail.com
Re: Abnormal JSON query performance Pavel Stehule <pavel.stehule@gmail.com>
Re: Abnormal JSON query performance 007reader@gmail.com
Re: Abnormal JSON query performance Pavel Stehule <pavel.stehule@gmail.com>
Abnormal JSON query performance "David G. Johnston" <david.g.johnston@gmail.com>
Re: Abnormal JSON query performance Tom Lane <tgl@sss.pgh.pa.us>
Re: Abnormal JSON query performance Merlin Moncure <mmoncure@gmail.com>
Re: Abnormal JSON query performance Tom Lane <tgl@sss.pgh.pa.us>
Re: Abnormal JSON query performance "David G. Johnston" <david.g.johnston@gmail.com>
Re: Abnormal JSON query performance Tom Lane <tgl@sss.pgh.pa.us>
Re: Abnormal JSON query performance "David G. Johnston" <david.g.johnston@gmail.com>
Re: Abnormal JSON query performance 007reader <007reader@gmail.com>
Re: Abnormal JSON query performance Dmitry Dolgov <9erthalion6@gmail.com>
Re: Abnormal JSON query performance reader 1001 <007reader@gmail.com>
Re: Abnormal JSON query performance "David G. Johnston" <david.g.johnston@gmail.com>
Re: Abnormal JSON query performance Dmitry Dolgov <9erthalion6@gmail.com>
Re: Abnormal JSON query performance Tom Lane <tgl@sss.pgh.pa.us>
Re: Abnormal JSON query performance Bruce Momjian <bruce@momjian.us>
Re: Abnormal JSON query performance reader 1001 <007reader@gmail.com>
Re: Abnormal JSON query performance Pavel Stehule <pavel.stehule@gmail.com>
Re: Abnormal JSON query performance 007reader <007reader@gmail.com>
Re: Abnormal JSON query performance 007reader <007reader@gmail.com>
On Mon, May 14, 2018 at 8:53 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, May 14, 2018 at 7:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> SELECT ... FROM ...some tables...,
>> jsonb_to_record(jsonbcol) AS j(id int, name text, price numeric)
>> WHERE ...
>>
>> which is something you can do today.

> ​Indeed you can - could you please point to the docs for that one?

https://www.postgresql.org/docs/current/static/functions-json.html#FUNCTIONS-JSON-PROCESSING-TABLE

​Thanks.  I was thinking you were still talking about "populate" variants of the functions and missed that you switched to the "to" variant in the final example.
 
Perhaps it'd be worth emphasizing the usefulness of jsonb_to_record[set]
a bit more, say with examples in section 8.14.

A section titled "JSON Element Extraction" under 8.14 that covers those functions in context and discusses the dynamics of multiple columns of -> invocations seem worthwhile.

"Ideally, JSON documents should each represent an atomic datum that business rules dictate cannot reasonably be further subdivided into smaller datums that could be modified independently."

See that new section should you decide to not heed the above advice, and in general converting between json and table forms.

David J.

В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: PG Bug reporting form
Дата:
FAQ