Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5B3K-0006nA-VZ for pgsql-general@arkaria.postgresql.org; Mon, 10 Aug 2020 16:53:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5B3J-0000RF-V6 for pgsql-general@arkaria.postgresql.org; Mon, 10 Aug 2020 16:53:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5B3J-0000R7-NB for pgsql-general@lists.postgresql.org; Mon, 10 Aug 2020 16:53:37 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5B3H-0003TW-Bh for pgsql-general@lists.postgresql.org; Mon, 10 Aug 2020 16:53:37 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 5D3595F79F; Mon, 10 Aug 2020 12:53:32 -0400 (EDT) Date: Mon, 10 Aug 2020 12:53:32 -0400 From: Stephen Frost To: Ron Cc: pgsql-general@lists.postgresql.org Subject: Re: UUID or auto-increment Message-ID: <20200810165332.GV29590@tamriel.snowman.net> References: <837516231.2607507.1597077490690@mail.yahoo.com> <2663a1f2-7377-58e7-ad7d-a867fe75cb15@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Lez9QO3Seu3ycz0M" Content-Disposition: inline In-Reply-To: <2663a1f2-7377-58e7-ad7d-a867fe75cb15@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Lez9QO3Seu3ycz0M Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greeitngs, * Ron (ronljohnsonjr@gmail.com) wrote: > On 8/10/20 11:38 AM, Ravi Krishna wrote: > >Finally UUID results in write amplication in wal logs.=A0 Keep that in m= ind > >if your app does lot of writes. >=20 > Because UUID is 32 bytes, while SERIAL is 4 bytes? and because it's random and so will touch a lot more pages when you're using it... Avoid UUIDs if you can- map them to something more sensible internally if you have to deal with them. Thanks, Stephen --Lez9QO3Seu3ycz0M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJfMXuLAAoJEO1sijiDR2RVfrQP/AqFY0GsQseM3936FkmBRE// cbwRiurCBCODc9s07fZ6F/JnNxUVRWAvu6x8ccmOzR1hhLbMucjzxhzfLb5S3Nkm RZWuZ4jqMFZmR2eEEfMU2RT0BPqK+MR19nk5K7CritGG8WKo7C7AKpnUEFb2LbrA 4rynYGbCTcs+tPElyhMEbq542jQZ97Y/wTWXL+zLLbidZAIH1DFInb/2nX+SAVcC eWStHGfT7KmMu6QOMJJ1BbA7YfnsFjIGhSMJamf5iswgIRAPC56TLeWwbKSxB8vz 9WT1hmXoy9BnJBvpDQizR0TfBZbm/vLWdVT+j68UIOArDdM5HKOYzjwGwZlLRh5K D6TmWZDva05ioX166W4m+K85DApdn9rPdSeUy15mGDk3AOwMRpNWLbCwt5VAcGkJ JwzN+h1YqmbuOLCTgASK3IfJiq/mwko4gmx/azihwIqsy2KytsGUYwOISL+xkfoo Zn+U9oVOA6Emyg2MTCGJ/6feXkDo9rWpYweb0pXvL1/isJ+uTKDa+EJskNC2URqo gDB7Nf4MR42vGdyyB8WJ+dlJyoReD1Cy7ilytFsTrEQFCotNImiGPI+yOBJuUAvQ uaIXzkLXmjobqSDbUabfM+GuV2VPT+VYXAqaMMPagXNeCWXZlJWezrQWbSzu4ZXq 274FRGkTmNBRXgLhn7bG =tHjN -----END PGP SIGNATURE----- --Lez9QO3Seu3ycz0M--