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.96) (envelope-from ) id 1vOFdA-00GzhQ-1e for pgsql-general@arkaria.postgresql.org; Wed, 26 Nov 2025 13:32:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vOFd9-00GbKa-02 for pgsql-general@arkaria.postgresql.org; Wed, 26 Nov 2025 13:32:23 +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.96) (envelope-from ) id 1vOFS4-00GWyL-0q for pgsql-general@lists.postgresql.org; Wed, 26 Nov 2025 13:20:56 +0000 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vOFS2-001bx4-2R for pgsql-general@lists.postgresql.org; Wed, 26 Nov 2025 13:20:56 +0000 Received: by mail-ua1-x931.google.com with SMTP id a1e0cc1a2514c-9372149216bso3980871241.3 for ; Wed, 26 Nov 2025 05:20:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764163252; x=1764768052; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=p2utomJ8xzV2wo52BdKACPm1hwwek3d/QLOteazrKEY=; b=P2/LBwt1FE05bure90LzTsSr3Bj8FdcqGkdhA5zrC21r5/KNPv6MJkbILkBFSHdvm/ krybgWD5Ch5lRGO6/dDwF4lkVc9a1jCLFlS+fixn7FiC7BZAIH1v4EibrzwB8lmqYmmX cYmrskPa9J60eNudQKuesuyLeH0QaKj0wjtVmRzr4w6+AHWZMEhhBRu8wE9uGTfHe5es VnB24771VZpOnXFmtExUFvHqoeL9RQ9S+Hz7RQo1Fgek4fAfOuTYeL1TsJ/Y3Q7oLSMi NdU18dxJPtYwf2VEtihcejv7wNA9dH2pXaqNBbS0DaVy3yXsT8DQqjId4opGGGhkzwfO 1Abg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764163252; x=1764768052; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=p2utomJ8xzV2wo52BdKACPm1hwwek3d/QLOteazrKEY=; b=Xe6dw6muKW47ZPyGEXyZf+aGw3Phj/Kq08OGZ51gKDOiUOHhmUnCCggaUnmmcEJzez nF+nMLCku3SmaK92MZsmKIn2CgUxywEXhjtt/c32KSdKp3n5NX38BLgLX+JvCJp3IBVl A/epM+xNJrwoMX5Hz9FTB6mzQklUjOj0xMCtTa4dZTpfAplBSvymn9yzzwRqprQvhbab 8JnZY4obQbiFKUpqcfV/Rwq9qsPhyoQDqj4ZjDDVLwboM7vlw11jwTjNE3x4iKTGFHk/ cxKZu0+3rIb2xJ6qG94r1IUcwXa7Ro9OKdbkWptjuAH7W0MnaU0SwunaPPLhGQj+GkxY Rzfw== X-Gm-Message-State: AOJu0YzV8FaLMpRndj7RAgfxzayl+0x8aXuk9hoP7A9sBxvwrlWdr+Jz n1RC4gMl1psW9w+SMwVtzDKZsBAEIli94XVxkCz9SbrXLxrW3ynkVaOa/xnOLNI4cP9uHF8/7+r qcNC6Rosl3D+oQpCj7kYyU1NyvtX8UpTmknE= X-Gm-Gg: ASbGncsz+F3THz+GQ8RS3XlEDZTIOVQfWQMJlXM+ZAKxwjRvTQDP43RKZ/J82JSfw+R WhV41NjVbEGInNu2y61PgfZigywavM/b/ocen/GQ/iRjXyvYIXzMqCY4ywXPHcf1JGA2/sNxfGt u9FZxQ6D/JrNiP8ye62uHgRRelU7JytnOrGZNCLfsM7sAyReglkkjpbQSLNFDebHAAxwkgvgdj5 h39ZjUpX/NOWXBejfEbgblaxGk761BIwWG9BBAjXWbI2xtMsC6UPSOA36WDPzqa8C5y12IhTlb5 L55uu/O/SNsf33pmdoqXuGRFHZp+L/zN4H6msTgkA+B1i7+Y3kgEOPYdGaRb X-Google-Smtp-Source: AGHT+IEWI1dZSph6WlVgrl+LDJCuL7M7zQlRgJNr5ICctaq98EB+eV42T8d28Qo9GVcwKatCf40MVh5v14vxvIHp/Qo= X-Received: by 2002:a05:6102:b0b:b0:5de:6dc:22c3 with SMTP id ada2fe7eead31-5e22442405cmr2430095137.42.1764163252303; Wed, 26 Nov 2025 05:20:52 -0800 (PST) MIME-Version: 1.0 From: atma ram Date: Wed, 26 Nov 2025 18:50:41 +0530 X-Gm-Features: AWmQ_blSiDGglKQEhyctXPrE3wWJRU4mX2f-ptkHWEF6JkHqV2tL5Y0osnj_9wQ Message-ID: Subject: =?UTF-8?Q?Question_on_PostgreSQL_Table_Partitioning_=E2=80=93_Perfor?= =?UTF-8?Q?mance_of_Queries_That_Do_Not_Use_the_Partition_Key?= To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000fab95a06447f430d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fab95a06447f430d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Question on PostgreSQL Table Partitioning =E2=80=93 Performance of Queries = That Do Not Use the Partition Key We have a table that is approximately 1.6 GB in size. Query performance has started to degrade. Although we have multiple indexes, the large table size is still causing performance issues. We are planning to partition the table on the primary key. This is an OLTP system, and there are around 100 queries that access this table. About 80 of these queries use the primary key and will therefore benefit directly from the partition key once we implement partitioning. However, the remaining 20 queries do not use the primary key; they rely on other indexed columns. Our question is: after partitioning the table, and after creating the necessary indexes on each partition, what happens to the performance of those 20 queries that do *not* use the partition key? =E2=80=93 Will their performance degrade? =E2=80=93 Will it remain the same as before partitioning? =E2=80=93 Is there any chance it will improve? Additional details: we plan to create only 16 partitions, so the partition count will not be very high. *Is there any benchmarking, documentation, or reference material that can help demonstrate how partitioning will affect the performance of the 20 queries that do not use the partition key?* This information is critical for us before proceeding with the partitioning strategy. Thank you in advance. Regards, Atma --000000000000fab95a06447f430d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Question on PostgreSQL Table P= artitioning =E2=80=93 Performance of Queries That Do Not Use the Partition = Key=C2=A0=C2=A0

We have a table that is approxi= mately 1.6 GB in size. Query performance has started to degrade. Although w= e have multiple indexes, the large table size is still causing performance = issues.

We are planning to partition the table on the primary key. This is an OL= TP system, and there are around 100 queries that access this table. About 8= 0 of these queries use the primary key and will therefore benefit directly = from the partition key once we implement partitioning. However, the remaini= ng 20 queries do not use the primary key; they rely on other indexed column= s.

Our question is: after partitioning the table, and after creating the ne= cessary indexes on each partition, what happens to the performance of those= 20 queries that do not use the partition key?
=E2=80=93 Will their performance degrade?
=E2=80=93 Will it remain the same as before partitioning?
=E2=80=93 Is there any chance it will improve?

Additional details: we plan to create only 16 partitions, so the partiti= on count will not be very high.

Is there any benchmarking, do= cumentation, or reference material that can help demonstrate how partitioni= ng will affect the performance of the 20 queries that do not use the partit= ion key?

This information is critical for us before proceeding with the partition= ing strategy.


Thank you in advance.
=
Regards,
Atma



--000000000000fab95a06447f430d--