pgx icon indicating copy to clipboard operation
pgx copied to clipboard

for performance: change JSONBCodec format to BinaryFormatCode.

Open piyongcai opened this issue 2 years ago • 1 comments

just for performance. because json.Unmarshal need []byte parameter

piyongcai avatar Nov 25 '23 10:11 piyongcai

In general, I don't want to merge any performance optimizations without a benchmark that shows the improvement.

That's especially true in this case because the text format was chosen on purpose. PostgreSQL (at least historically) has a significant performance penalty when returning text-like types as binary. See https://github.com/jackc/pg_text_binary_bench.

jackc avatar Dec 02 '23 00:12 jackc