Re: UUID v7
От | Andrey M. Borodin |
---|---|
Тема | Re: UUID v7 |
Дата | |
Msg-id | 8B25071B-6829-44C3-BFD7-A300CDFE7FB9@yandex-team.ru обсуждение исходный текст |
Ответ на | Re: UUID v7 (Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au>) |
Ответы |
Отв.: Re: UUID v7
|
Список | pgsql-hackers |
> On 28 Nov 2024, at 04:07, Sergey Prokhorenko <sergeyprokhorenko@yahoo.com.au> wrote: > > It would be useful to add a standard comparative benchmark with several parameters and use cases to the patch, so thatIT departments can compare UUIDv7, ULID, UUIDv4, Snowflake ID and BIGSERIAL for their hardware and conditions. > > I know for a fact that IT departments make such benchmarks of low quality. They usually measure the generation rate, whichis meaningless because it is usually excessive. It makes sense to measure the rate of single-threaded and multi-threadedinsertion of a large number of records (with and without partitioning), as well as the rate of execution ofqueries to join big tables, to update or delete a large number of records. It is important to measure memory usage, processorload, etc. Publishing benchmarks seems to be far beyond what our documentation go for. Mostly, because benchmarks are tricky. You canprove anything with benchmarks. Everyone is welcome to publish benchmark results in their blogs, but IMO docs have a very different job to do. I’ll just publish one benchmark in this mailing list. With patch v39 applied on my MB Air M2 I get: postgres=# create table table_for_uuidv4(id uuid primary key); CREATE TABLE Time: 9.479 ms postgres=# insert into table_for_uuidv4 select uuidv4() from generate_series(1,3e7); INSERT 0 30000000 Time: 2003918.770 ms (33:23.919) postgres=# create table table_for_uuidv7(id uuid primary key); CREATE TABLE Time: 3.930 ms postgres=# insert into table_for_uuidv7 select uuidv7() from generate_series(1,3e7); INSERT 0 30000000 Time: 337001.315 ms (05:37.001) Almost an order of magnitude better :) Best regards, Andrey Borodin.
В списке pgsql-hackers по дате отправления: