Indexes that would span partitions.

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Indexes that would span partitions.
Date: 2022-03-14 05:13:39
Message-ID: CAGuHJrP+v-PNPpHgE5VcL3HHszH3cV86Hq3SM4Zzn_PBX6=d_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

What's a good strategy for dealing with indexes (multiple) that would
span multiple partitions of a table.

For example:

Let's say I have a table that's partitioned by group_id because I
want all the records for a group to be in the same partition. Let's
say I have a field called "expires_at" which is a date. Let's presume
the expiry date can be updated.

If I want to do something to every record that is due to be expired
the database is going to be touching practically every partition and
this seems like it could present a problem.

Is there a more efficient way to deal with something like this?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Арсен Арутюнян 2022-03-14 12:53:25 LISTEN/NOTIFY ultra slow speed
Previous Message benj.dev 2022-03-13 17:05:50 Re: delete query using CTE