Re: checking for a NULL date in a partitioned table kills performance
Scott Ribe <scott_ribe@elevated-dev.com>
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Doug Reynolds <mav@wastegate.net>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Date: 2024-08-23T16:08:49Z
Lists: pgsql-performance
> On Aug 23, 2024, at 9:42 AM, Doug Reynolds <mav@wastegate.net> wrote: > > The only difference is that you would be reading from one index instead of two, which could be more efficient. 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.