pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Cache argument type information in json(b) aggregate functions.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Cache argument type information in json(b) aggregate functions.
@ 2015-09-18 18:45  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2015-09-18 18:45 UTC (permalink / raw)
  To: pgsql-committers

Cache argument type information in json(b) aggregate functions.

These functions have been looking up type info for every row they
process. Instead of doing that we only look them up the first time
through and stash the information in the aggregate state object.

Affects json_agg, json_object_agg, jsonb_agg and jsonb_object_agg.

There is plenty more work to do in making these more efficient,
especially the jsonb functions, but this is a virtually cost free
improvement that can be done right away.

Backpatch to 9.5 where the jsonb variants were introduced.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1e1ae6e0b0c11e6044c0dacd61cb17c8d8bc87f1

Modified Files
--------------
src/backend/utils/adt/json.c  |  125 ++++++++++++++++------------
src/backend/utils/adt/jsonb.c |  181 ++++++++++++++++++++++-------------------
2 files changed, 173 insertions(+), 133 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Cache argument type information in json(b) aggregate functions.
@ 2015-09-18 18:45  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2015-09-18 18:45 UTC (permalink / raw)
  To: pgsql-committers

Cache argument type information in json(b) aggregate functions.

These functions have been looking up type info for every row they
process. Instead of doing that we only look them up the first time
through and stash the information in the aggregate state object.

Affects json_agg, json_object_agg, jsonb_agg and jsonb_object_agg.

There is plenty more work to do in making these more efficient,
especially the jsonb functions, but this is a virtually cost free
improvement that can be done right away.

Backpatch to 9.5 where the jsonb variants were introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c00c3249e3247d24751d97ff6f26603810593414

Modified Files
--------------
src/backend/utils/adt/json.c  |  125 ++++++++++++++++------------
src/backend/utils/adt/jsonb.c |  181 ++++++++++++++++++++++-------------------
2 files changed, 173 insertions(+), 133 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-09-18 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-09-18 18:45 pgsql: Cache argument type information in json(b) aggregate functions. Andrew Dunstan <andrew@dunslane.net>
2015-09-18 18:45 pgsql: Cache argument type information in json(b) aggregate functions. Andrew Dunstan <andrew@dunslane.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox