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 1shWqZ-003QLY-3S for pgsql-admin@arkaria.postgresql.org; Fri, 23 Aug 2024 16:09:07 +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 1shWqX-00Ejpx-1u for pgsql-admin@arkaria.postgresql.org; Fri, 23 Aug 2024 16:09:05 +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 1shWqW-00Ejpk-K7 for pgsql-admin@lists.postgresql.org; Fri, 23 Aug 2024 16:09:05 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1shWqU-0015KT-Pw for pgsql-admin@lists.postgresql.org; Fri, 23 Aug 2024 16:09:03 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 4940DE205F; Fri, 23 Aug 2024 16:09:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1724429341; bh=Xtx6QbrrJr5/zU4dAaj2FV+AmEk3OZFEdQQ/Gl4NUPY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=At718hftSA3m44CM4qK7AfYUuvTYBl1vbm4rPvtsZ5RxM77GWv4nojvKjvPVvKvzR SsbLQgoDhp76K91N96OzPbOVsyM/CtwuMR+Q0c514sYYEXMI1yTS9NfdfE6/1v/gVg 5KHABoZ3k7EQdd6iTL6yZVHs+ZqLYvZMvNkEcdlwUglgCA2Ory6C2AQdxFBQRHKSB3 /olW9SMn50sinUuRJc2WzA0C4v/mS/wHZIUzk3sLFWu8b6Kc5H21ztHh4yVY85WrAm 0cRYUyHsPh/Upb5Mh4vAvJA5hzvibCZ5XBYjRg0AsrGT5bLTB7T/vGHqyEZVlIRLhb vF4JQIHTZOLyQ== X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IE-PY3bCuHvO; Fri, 23 Aug 2024 16:09:00 +0000 (UTC) Received: from smtpclient.apple (unknown [50.173.60.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 9801DE205E; Fri, 23 Aug 2024 16:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1724429340; bh=Xtx6QbrrJr5/zU4dAaj2FV+AmEk3OZFEdQQ/Gl4NUPY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Fyv4fXQhD+Ws8InTbQgtPfowzRLNADWH6bH3QFBoQ+lGlf5ly1PBmALoYc7emL4TF 7oplpmlrYdx4ks+8hv2c4PTOLeN1ba+D0e0YNF5UfHeuD5CCHLGpW1FWorA3HRYQIz yrI6TIajJIsdksrK8ElS8MDLWAa57gIl7+wq2gVUUQL8ouVF/2P4UVv0jCxslk9K9T xRT7ASDovTf9QbP4EHRxyEh88LQ87ZA1yoWA0CfDYdiuM5rbNLEBQmtvyQzpgC+Bxh 21cQPeFzaGwRmNFxwxHUFt6hjkyyD1SwPC6XRTxjwNjdCQhQO78n6T3VPQWO54W+wf QDq52mHJl4kew== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: checking for a NULL date in a partitioned table kills performance From: Scott Ribe In-Reply-To: <010001917fe71552-589dbc9b-2c78-4a0d-8405-040db3cc09d7-000000@email.amazonses.com> Date: Fri, 23 Aug 2024 10:08:49 -0600 Cc: Pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: <9EE69544-3ADC-4882-89E8-3205278FEFC3@elevated-dev.com> References: <1F2BA008-3732-4289-876A-EF6889474E08@elevated-dev.com> <010001917fe71552-589dbc9b-2c78-4a0d-8405-040db3cc09d7-000000@email.amazonses.com> To: Doug Reynolds X-Mailer: Apple Mail (2.3776.700.51) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Aug 23, 2024, at 9:42=E2=80=AFAM, Doug Reynolds = wrote: >=20 > The only difference is that you would be reading from one index = instead of two, which could be more efficient.=20 Ah yes, that's a good point to take into consideration in such a case. In the one at hand though, if statistics are correct, neither index is = going to be used, given the 90% of rows with NULL values. Using an index = would just waste time compared to a simple sequential scan.=