Re: [PATCH] Optimize json_lex_string by batching character copying

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jelte Fennema <Jelte(dot)Fennema(at)microsoft(dot)com>, "mmoncure(at)gmail(dot)com" <mmoncure(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: [PATCH] Optimize json_lex_string by batching character copying
Date: 2022-08-15 18:34:31
Message-ID: CAEudQArNtiFgrMbmmw7k+0JfoROE4a0fv7HL8_7oG3Wu0-Kw4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I ran this test.

DROP TABLE IF EXISTS long_json_as_text;
CREATE TABLE long_json_as_text AS
with long as (
select repeat(description, 11)
from pg_description
)
select (select json_agg(row_to_json(long))::text as t from long) from
generate_series(1, 100);
VACUUM FREEZE long_json_as_text;

select 1 from long_json_as_text where t::json is null;

head:
Time: 161,741ms

v5:
Time: 270,298 ms

ubuntu 64 bits
gcc 9.4.0

Am I missing something?

regards,
Ranier Vilela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2022-08-15 18:38:59 Re: [PATCH] Optimize json_lex_string by batching character copying
Previous Message Andres Freund 2022-08-15 18:11:46 Re: build remaining Flex files standalone