On Wed, Sep 23, 2026 at 9:10 PM Sehrope Sarkuni <sehrope@jackdb.com> wrote:
> Timings on an AMD Ryzen 7 5700G, release build (-O3, no asserts),
> pgbench -c 1 with one statement per transaction, alternating
> before/after rounds, median latency in ms of 5 rounds (3 at 100M):
>
> SELECT octet_length(rpad('x', N, ' '))
> or
> SELECT octet_length(lpad('x', N, '0'))
>
> N rpad before after lpad before after
> 1 0.056 0.056 0.057 0.056
> 10 0.056 0.056 0.057 0.056
> 100 0.056 0.056 0.057 0.057
100 is already far beyond the usual N values I've seen in real life,
and there is no measured difference here, so I don't see what problem
this is solving.
--
John Naylor
Amazon Web Services