Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDi3U-002flU-N1 for pgsql-performance@arkaria.postgresql.org; Wed, 20 Nov 2024 10:35:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tDi3T-004VKJ-3u for pgsql-performance@arkaria.postgresql.org; Wed, 20 Nov 2024 10:35:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDi3S-004VKB-GQ for pgsql-performance@lists.postgresql.org; Wed, 20 Nov 2024 10:35:26 +0000 Received: from mail1.dalibo.net ([51.159.93.128] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDi3P-002rYn-Cs for pgsql-performance@lists.postgresql.org; Wed, 20 Nov 2024 10:35:24 +0000 Received: from [192.168.0.7] (5-49-10-71.hfc.dyn.abo.bbox.fr [5.49.10.71]) by mail.dalibo.com (Postfix) with ESMTPSA id A926626E22; Wed, 20 Nov 2024 11:35:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1732098920; bh=KB93n0GRnInRGcceJNS9W1xWTUsHOqBH6Omd8CpvY4k=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IEXOZIwtb5uoPgWZ2j4CLvNvCHldqeFiS9cedlQSp5DBAa3Wz6QOSTl1BE8uhEYdu uKNKO4QZxSj5CUCsIuMGUjZFwzTEoOIKv0iieyB2WNyyUsrt9EswR+JY/j2pZMurnj vX6DpfY5QNM/Hy4jsvkXtd07xgcaZClS815jy0vA= Message-ID: <349427bd-e4c1-4990-a294-fe9c8779afe9@dalibo.com> Date: Wed, 20 Nov 2024 11:35:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Has gen_random_uuid() gotten much slower in v17? To: David Mullineux , Peter Eisentraut Cc: pgsql-performance@lists.postgresql.org References: <68398e13-35fd-410b-b279-c200e07ffcbd@eisentraut.org> From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Yhuel?= Content-Language: fr, en-US Autocrypt: addr=frederic.yhuel@dalibo.com; keydata= xjMEXn3bgxYJKwYBBAHaRw8BAQdA6tX5FT/n5ztMWIoBdl6k5avvu65fv6ryfVzIx/aH3V3N JEYuIFlodWVsIDxmcmVkZXJpYy55aHVlbEBkYWxpYm8uY29tPsKWBBMWCAA+FiEEi7OTyf6H ePS+C6n11XGWhN8zGNUFAmZDVJ8CGwMFCQtfi90FCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA CgkQ1XGWhN8zGNV65gEA6o+UrebFjn2CIAOYwP3CiiJugiM5TMH9yJyehQua5ZoA/2ChxiVn 8OUaAw/ErxJmQi1mSN0tNZBL/KhkUPBDUDQNzjgEXn3bgxIKKwYBBAGXVQEFAQEHQCuh5cLQ AtEBXHa2Fmtp0kduBu7msM7qO/gaEcdjFUdiAwEIB8J+BBgWCAAmAhsMFiEEi7OTyf6HePS+ C6n11XGWhN8zGNUFAmZDVJ8FCQtfi90ACgkQ1XGWhN8zGNWOOAEArSqePBqfd4Kx4ulACaWO 6fM+XSDfUlBAQXx9rU6DR4MBALwozl9g91tRysim6lKxggvBfp/PvbpTZNrxYLWB2fYP In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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?