diff options
author | Michael Paquier <michael@paquier.xyz> | 2024-02-22 10:02:55 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2024-02-22 10:02:55 +0900 |
commit | 011d60c4352c5c48c0f1a185e8a12833c22a58db (patch) | |
tree | 3c4bf5dc8bcebb6b101300f50d06c40e3d665939 /src/backend/replication | |
parent | 943f7ae1c8693cf3ea59d103aaf9590ea062fb9c (diff) | |
download | postgresql-011d60c4352c5c48c0f1a185e8a12833c22a58db.tar.gz postgresql-011d60c4352c5c48c0f1a185e8a12833c22a58db.zip |
Speed up uuid_out() by not relying on a StringInfo
Since the size of the string representation of an uuid is fixed, there
is no benefit in using a StringInfo. This commit simplifies uuid_oud()
to not rely on a StringInfo, where avoiding the overhead of the string
manipulation makes the function substantially faster.
A COPY TO on a relation with one UUID attribute can show up to a 40%
speedup when the bottleneck is the COPY computation with uuid_out()
showing up at the top of the profiles (numbered measure here, Laurenz
has mentioned something closer to 20% faster runtimes), for example when
the data is fully in shared buffers or the OS cache.
Author: Laurenz Albe
Reviewed-by: Andres Freund, Michael Paquier
Description: https://postgr.es/m/679d5455cbbb0af667ccb753da51a475bae1eaed.camel@cybertec.at
Diffstat (limited to 'src/backend/replication')
0 files changed, 0 insertions, 0 deletions