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 1k5AoV-0006Hj-D3 for pgsql-general@arkaria.postgresql.org; Mon, 10 Aug 2020 16:38:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5AoU-00081M-6l for pgsql-general@arkaria.postgresql.org; Mon, 10 Aug 2020 16:38:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5AoT-000816-NC for pgsql-general@lists.postgresql.org; Mon, 10 Aug 2020 16:38:17 +0000 Received: from sonic313-56.consmr.mail.ne1.yahoo.com ([66.163.185.31]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k5AoR-0004FA-HH for pgsql-general@postgresql.org; Mon, 10 Aug 2020 16:38:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1597077493; bh=900FZpfvHLpKWcvd0X8pDInZ9lOK7KPYNcrb0oZhX9A=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=VF2JUUOozeWE/EezCKSpTfZxglF0DZRbka6k+65xY/UaO/6dHImWy+dcCIxu6dggjnAfoTFY7HX0k+SRZdeMfsnNNGGasCsqXLdirp51caOgS7TtNGi7tpl9KgmJ/c1CWSCbm3Ho1xyn4A48XzezlJndVAxulmgFl/Quku/peT/0EJKfgN4qYxj7SkcSqIF8nyeMv9It2iAAEcGxOKIhr3U6EyO5C1PLXVIZfZMlMhjY6DN4qYvY0JB+Gqa7gAkBbZdAbtZ2Q8TJrBeJlp7dZmK4EnTiIRwp97IRG8lM+axJgxGMQCPRoRDj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sFVSY4nmrbZpFd ifAV9FjV808jSTF3Onk4QTdnjazPNxvqWrAIE90gl__n8K1guwHSWHYD3xQSvZebZeTMlXKc_tte zEzdKEEpFtcXnp9jlLc765bCd_Y6HHpEDdM85a0JJ0we9nHmhT0BrMx8NJA9dPNqo5jv8PfNroaB R1DmArblTDMyE6V.om38yRkg_CUZ_iix_Suzn0biBLg742FzUysK9g32g.LRCQtLR65N9eDi3qc4 fdR1jN04TfqVk2HrBQbY20Vp_xnLtUhi4vChh9HE3pp5yB8dYw390PpNwwp8IboGqsTbrjE6fetg t7eZdy7LuK6PQLXgI6yx8zYwunM5lRqyJuT2dfJzZirTFcfqFmKgHgHmq3ufli4iC Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Mon, 10 Aug 2020 16:38:13 +0000 Date: Mon, 10 Aug 2020 16:38:10 +0000 (UTC) From: Ravi Krishna Reply-To: Ravi Krishna To: pgsql-general@lists.postgresql.org, pgsql-general@postgresql.org Message-ID: <837516231.2607507.1597077490690@mail.yahoo.com> In-Reply-To: References: Subject: Re: UUID or auto-increment MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2607506_465296488.1597077490689" X-Mailer: WebService/1.1.16436 YMailNorrin Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36 Content-Length: 2423 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2607506_465296488.1597077490689 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Both can handle concurrent writes.=C2=A0 auto-increment is nothing but seri= al or sequence cols and they can handle unique concurrent request.=C2=A0 Th= at is why sometimes you may have gaps.UUID is not only unique, but is also = unique across space. You can have two different databases generate UUID at = the same time and it will still be unique. So that will help if you are con= solidating different databases into one big data mart and they can all can = go to the same table without conflict. With Sequence or Serial that will be= a problem.Finally UUID results in write amplication in wal logs.=C2=A0 Kee= p that in mind if your app does lot of writes. =20 ------=_Part_2607506_465296488.1597077490689 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Both = can handle concurrent writes.  auto-increment is nothing but serial or= sequence cols and they can handle unique concurrent request.  That is= why sometimes you may have gaps.
UUID is = not only unique, but is also unique across space. You can have two differen= t databases generate UUID at the same time and it will still be unique. So = that will help if you are consolidating different databases into one big da= ta mart and they can all can go to the same table without conflict. With Se= quence or Serial that will be a problem.
F= inally UUID results in write amplication in wal logs.  Keep that in mi= nd if your app does lot of writes.

------=_Part_2607506_465296488.1597077490689--