Re: comparing index columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: comparing index columns
Дата
Msg-id 9123.1181741806@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: comparing index columns  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> How about just doing a memcmp? That would be safe, simple and fast and 
> covers all interesting use cases.

You'd have to use datumIsEqual() or equivalent, and figure out what to
do about nulls.  I think it'd work though, at least for the purposes
that HOT needs.  There are failure cases; for example a previously
not-toasted index key column could get toasted due to expansion of an
unrelated data column.  But +1 for speed over accuracy here, as long as
it can never make a false equality report.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: EXPLAIN omits schema?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: DROP TABLE and autovacuum