Re: Indexes that would span partitions.

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Indexes that would span partitions.
Date: 2022-03-15 07:32:37
Message-ID: CAGuHJrP0Whc-mx5mX1ye2+MEa73tvPcSnR6V8mDKrhuG-UGYfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> How many partitions do you expect to have? Why are you partitioning on that column? Do you have need to drop old data all at the same time? How many rows in each partition or in total do you expect to have?

In my case there is a hierarchy so the partitions are based on certain
parts of the hierarchy. For example.

There is an item 1.2.3.4.5.6.7.8 The partition is based on 1.2 (a
function based hash scheme). I could fine tune the number of
partitions simply by writing my function.

Each item has certain attributes that I want to index. For example all
items have an expiry_date. I will be archiving the items when they
expire but of course all those items will not be in the same
partition. In fact it's highly probable all partitions will have to
be visited in order to accomplish this task.

Unfortunately I will not be able to drop an entire partition and I
can't partition by expiry date because access is most often by the
item number. Also of course the expiry date can change over the
lifetime of the item.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Арсен Арутюнян 2022-03-15 07:34:23 Re: LISTEN/NOTIFY ultra slow speed
Previous Message Sankar, Uma (Uma) 2022-03-15 07:20:57 Postgres Crash Issue