Re: Has gen_random_uuid() gotten much slower in v17? - Mailing list pgsql-performance

From Frédéric Yhuel
Subject Re: Has gen_random_uuid() gotten much slower in v17?
Date
Msg-id 349427bd-e4c1-4990-a294-fe9c8779afe9@dalibo.com
Whole thread Raw
In response to Re: Has gen_random_uuid() gotten much slower in v17?  (David Mullineux <dmullx@gmail.com>)
Responses Re: Has gen_random_uuid() gotten much slower in v17?
List pgsql-performance

On 9/11/24 12:47, David Mullineux wrote:
> Good idea. Thanks.    I did check. It's not enabled by default but just 
> in case I did another build. This time explicitly defining --disable- 
> debug and --disable-cassert. And I tested. Still slower than old versions.
> 

4.5 seconds is very surprising.

on my machine:

postgres=# explain (analyze, costs off) select gen_random_uuid() from 
generate_series(1, 50000);
                                     QUERY PLAN 

----------------------------------------------------------------------------------
  Function Scan on generate_series (actual time=3.507..123.492 
rows=50000 loops=1)
  Planning Time: 0.031 ms
  Execution Time: 125.481 ms
(3 rows)

postgres=# select version();
                                            version 

----------------------------------------------------------------------------------------------
  PostgreSQL 18devel on x86_64-pc-linux-gnu, compiled by gcc (Debian 
12.2.0-14) 12.2.0, 64-bit

pg_config | grep CONFIGURE
CONFIGURE =  '--enable-cassert' '--enable-debug' '--with-python' 
'CFLAGS=-ggdb -Og -g3 -fno-omit-frame-pointer' '--prefix' 
'/postgres/pgenv/master'

> This feels like a build configuration problem. Just can't put my finger 
> on it yet.

Why not using a profiler to see what's going on?




pgsql-performance by date:

Previous
From: Achilleas Mantzios - cloud
Date:
Subject: Re: tds_fdw : Severe performance degradation from postgresql 10.23 to 16.4
Next
From: Tom Lane
Date:
Subject: Re: Has gen_random_uuid() gotten much slower in v17?