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 1rwJCt-000tun-Ms for pgsql-general@arkaria.postgresql.org; Mon, 15 Apr 2024 10:04:59 +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 1rwJCr-00CGiG-EH for pgsql-general@arkaria.postgresql.org; Mon, 15 Apr 2024 10:04:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwJCr-00CGi8-1c for pgsql-general@lists.postgresql.org; Mon, 15 Apr 2024 10:04:57 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rwJCk-0013D1-IF for pgsql-general@lists.postgresql.org; Mon, 15 Apr 2024 10:04:56 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-56e1bbdb362so3005600a12.1 for ; Mon, 15 Apr 2024 03:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713175488; x=1713780288; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=zAPhM8rTVa6KALKwbMbF2ewBMXmy5MkRNqBWKMuHHv4=; b=M0YEECzxmkvDghxMnTQ+8tGTf2XNIMTS7SHc3X+h/w5+llEPvuiJdLeRg9wjaWypNR tWhftE1YJjNbcT7WARKFeYZq2LRHMpIW7wl+bfy3EAlBE43TX1XR54NL3GutSHkrS+7W ox/Br56Tey1uEdO/fAEjglRVFhgrFZlxjlnTHPa8wRLuyx6Rxa2/l5D02brT1mc7jq+j mYy1NRJIYTFEXAIW4AvbWuB9M8t5O5nWWzr3jkwqWwOX/VxtwlnNT2efuiNdYq9X4rPx SnjAqANCZzQoBXZcZXZd3K+fVpfBNV5ziqCuHIo4jqOvMOXOkfIpN0kHz0frV2S/78F6 +uOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713175488; x=1713780288; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zAPhM8rTVa6KALKwbMbF2ewBMXmy5MkRNqBWKMuHHv4=; b=Mfv/P3+TCruuLO5fthyQU3Z16r3Pg+UXeYvpneIkQjFQHjuJnWZeJRIJZkpPYc7JPs IbNtg11rWrAuH99X1R8gbv3hEc5t3Hpq9ETKOwg184HIt6J24lPv0ZbCtZtEvfgOg1Tr jvK/5pMND7HJq7e9Dn42eEYxiilrcrEQKQnrrdtmERN9tJR4y+DRxtLhAP7iOCsPk0/v ktEfQBUgaHDNYWfE9mCxNZ4nWEiW4hC3kFGRWf2r42+BCHdMtV6ygOh25RRF2wSqiu/K 8ZYENY5un4z2vRoCwKPu3gE7wKoEntXGRIJVLySXOw6yNqHyY/PyvZXq+M8ANxqpHwh/ eALw== X-Gm-Message-State: AOJu0YyEva7eW06P0vOLLWnGe6WjKZ+YNSf/l0Qu6p58CZHPLyWIO/Kb AtK57U38570dByFPmIdLul8geWKN5OCPPYqTepRIDbs21MNIewasU6aRub8NMHgvhDIjV0UOPXF t3BJGnvbLMqdXM3RGqdUOFEb52y3xSsvYiD4= X-Google-Smtp-Source: AGHT+IHP6NiMEDg/upEBCzSZh35mTdIEIa13y+7lSKQo2fcirM86XlojMsDJ/wGNtcCPTRGLdMoXPwPQF20fO0SbI7E= X-Received: by 2002:a17:906:4ed9:b0:a52:696:5c6d with SMTP id i25-20020a1709064ed900b00a5206965c6dmr7664087ejv.37.1713175487827; Mon, 15 Apr 2024 03:04:47 -0700 (PDT) MIME-Version: 1.0 From: Sanjay Minni Date: Mon, 15 Apr 2024 15:34:21 +0530 Message-ID: Subject: efficiency random values / sequential ID values in indexes To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000063d92606161fc005" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000063d92606161fc005 Content-Type: text/plain; charset="UTF-8" Hi Is there any appreciable difference in using random values or sequential values in indexes in a multi tenanted application there is a choice that the single field ID's value is totally random / UUID or the numbers are created with a prefix of the tenant. Since all access will be within a tenant only, will it make any performance difference between using purely random values vs +. thanks Sanjay --00000000000063d92606161fc005 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0

Is there any appreciable difference in using rand= om values or sequential values in indexes=C2=A0

in a multi tenanted ap= plication there is a choice that the single field ID's value is totally= random=C2=A0/ UUID or the numbers are created with a prefix of the tenant.= Since all access will be within a tenant only, will it make any performanc= e difference between using purely random values vs <tenant no prefix par= t>+<random value>.

thanks
Sanjay

=C2=A0
=C2=A0=C2=A0
--00000000000063d92606161fc005--