Re: pg12 - partition by column that might have null values

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
Cc: Mike Sofen <msofen(at)runbox(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: pg12 - partition by column that might have null values
Date: 2019-10-03 17:55:22
Message-ID: CAHOFxGrRE0DWbgGMteo4rM7RWoZqZ_JMxOk+a=aGALEKVdxY5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Just create a partial index on id column where end_date = infinity (or null
if you really prefer that pattern) and the system can quickly find the rows
that are still most current revision. How many rows do you have in this
table? Or foresee ever having? What took you down the road of partitioning
the table? Theory only, or solving a real life optimization problem?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ogden Brash 2019-10-03 20:30:30 Some observations on very slow pg_restore operations
Previous Message Mariel Cherkassky 2019-10-03 07:30:20 Re: pg12 - partition by column that might have null values