Re: [HACKERS] [PATCH] Generic type subscripting - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: [HACKERS] [PATCH] Generic type subscripting
Date
Msg-id CA+q6zcWBM=fdfw_80VpAdYZDDuxrWaD82+iM8wm7=yG0DWQhMA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] Generic type subscripting  (Dmitry Dolgov <9erthalion6@gmail.com>)
Responses Re: [HACKERS] [PATCH] Generic type subscripting  (Oleksandr Shulgin <oleksandr.shulgin@zalando.de>)
List pgsql-hackers
> On 22 February 2018 at 18:30, Dmitry Dolgov <9erthalion6@gmail.com> wrote:
>
> Few more updates. I've attached a new version with some minor changes,
> mostly
> about moving a subscripting depth check to type related logic. Also I've
> made
> some performance tests for arrays using pgbench:
>
>     pgbench -c 10 -j 2 -T 600 -f test.sql -r
>
> with queries like:
>
>     select (ARRAY[1, 2, 3])[0];
>     select (ARRAY[1, 2, 3, ...,  98, 99, 100])[0];
>     select (ARRAY[[[[[[1]]]]]])[1][1][1][1][1][1];
>     select (ARRAY[[[[[[1, 2, 3]]]]]])[1][1][1][1][1:2];
>
> and the difference in average latency was about 2%:
>
> * with the patch
>
>     number of transactions actually processed: 349211
>     latency average = 1.718 ms
>     tps = 5820.048783 (including connections establishing)
>     tps = 5820.264433 (excluding connections establishing)
>
> * without the patch
>
>     number of transactions actually processed: 356024
>     latency average = 1.685 ms
>     tps = 5933.538195 (including connections establishing)
>     tps = 5934.124599 (excluding connections establishing)
>

One more small update after fd1a421fe6 in attachments.

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Rewrite of pg_dump TAP tests
Next
From: Alvaro Herrera
Date:
Subject: Re: using index or check in ALTER TABLE SET NOT NULL