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

Поиск
Список
Период
Сортировка
От Mike Sofen
Тема RE: pg12 - partition by column that might have null values
Дата
Msg-id 072201d5791a$0da81ed0$28f85c70$@runbox.com
обсуждение исходный текст
Ответ на Re: pg12 - partition by column that might have null values  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
Ответы Re: pg12 - partition by column that might have null values
Список pgsql-performance

From: Mariel Cherkassky <mariel.cherkassky@gmail.com>
Sent: Wednesday, October 02, 2019 12:37 AM
Whenever I have a new revision of that object, I update the end_time of the latest revision to be now() and I add a new record of that object with end_date null.

The null value is used to find most recent revisions of objects..

Thanks for the suggestion of infinity ! I'll try it.

 

My partitioning table design model always uses a partitioning column that is 100% static since that guarantees that rows are not constantly moving between partitions (with index update overhead etc).  In this scenario I’d use a “StartTime” column to anchor the row in a partition.  The relatively few rows with a null EndTime don’t need the power of partitioning, just an index to find them.

 

Mike Sofen

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mariel Cherkassky
Дата:
Сообщение: Re: pg12 - partition by column that might have null values
Следующее
От: Mariel Cherkassky
Дата:
Сообщение: Re: pg12 - partition by column that might have null values