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

From: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
To: Mike Sofen <msofen(at)runbox(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: pg12 - partition by column that might have null values
Date: 2019-10-03 07:30:20
Message-ID: CA+t6e1=o2fNJpwvTyaiyYF-F=w0FOVyJYi=A7dCUPJdKL1tQrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Not sure how data storage is relevant here, I was only focusing on query
optimization. Lets say that most of the data isnt moving (history data).
However, objects can be changed and therefore new revisions are added and
the previous revisions updated (their end_date is updated). If you run
queries that involve the end_date very common (in order to get the most
recent revision of objects) it will be better to set this column as a
partition column instead just having an index on this col. In this way,
getting all the recent revisions of a specific object is reached by log(m)
[m is the number of most recent revisions] instead of logn [n is the number
of revisions u have] and n is by far bigger than m. Correct me I'f I'm
wrong, this topic is quite interesting ..

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2019-10-03 17:55:22 Re: pg12 - partition by column that might have null values
Previous Message Mike Sofen 2019-10-02 23:14:22 RE: pg12 - partition by column that might have null values