From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Wu <staywithpin@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: HOT update: why must ALL indexes should be update?
Date: Fri, 21 Apr 2023 10:19:42 -0400
Message-ID: <3338045.1682086782@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPoYtoKY9JSkwxM5BDyameea7gEWw1a0v_8gaZbazsT73YqzVQ@mail.gmail.com>
References: <CAPoYtoKY9JSkwxM5BDyameea7gEWw1a0v_8gaZbazsT73YqzVQ@mail.gmail.com>
Daniel Wu <staywithpin@gmail.com> writes:
> We have many indexes on a table. The chance is that any column could be
> some part of an index. I understand that when an index has a column that is
> updated, we can't use HOT, because the index entry could point to a totally
> different row. But if I have 10 indexes, if only 1 index will be updated,
> why the rest 9 indexes couldn't use HOT update?
Whether it's a HOT update is a property of the table row, not of
individual indexes.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, staywithpin@gmail.com
Subject: Re: HOT update: why must ALL indexes should be update?
In-Reply-To: <3338045.1682086782@sss.pgh.pa.us>
References: <CAPoYtoKY9JSkwxM5BDyameea7gEWw1a0v_8gaZbazsT73YqzVQ@mail.gmail.com> <3338045.1682086782@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox