Re: pg12 - partition by column that might have null values
Mariel Cherkassky <[email protected]> Wed, 2 Oct 2019 16:44:31 +0300
| Newsgroups | gmane.comp.db.postgresql.performance |
|---|---|
| Message-ID | <CA+t6e1mLdjA=PF6PO5HY3XoNPwOeHjb3OVY4QRZ5U5iiy-faVA@mail.gmail.com> |
but the start time doesnt indicates that the object is the most recent, it just indicates when the object was added to your table. If your queries involve the start_time I can understand why u set it as a partition column, otherwise is isnt useful. In most of my queries I query by one of 2 options : 1.Where end_time is null 2.Where start_date>DATE and end_date <DATE I think that doing the following will be the best option : partition by list (end_time) - (1 for all non null (non infinity) and 1 default for all those who has end_time that isnt null) on each partition I'll create range partition on the end_date so that I can search for revisions faster. What do you think ?