Re: texteq/byteaeq: avoid detoast [REVIEW]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: texteq/byteaeq: avoid detoast [REVIEW]
Дата
Msg-id 20347.1295296796@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: texteq/byteaeq: avoid detoast [REVIEW]  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: texteq/byteaeq: avoid detoast [REVIEW]  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> I wonder if we can trust the *equality* test, but not the inequality?
> E.g. if compressed(A) == compressed(B) we know they're the same, but
> if compressed(A) != compressed(B) we don't know they're not they still
> might be.

I haven't looked at this patch, but it seems to me that it would be
reasonable to conclude A != B if the va_extsize values in the toast
pointers don't agree.  Once you've fetched the toasted values, you've
spent enough cycles that there's not going to be much point in
trying to do any cute optimizations beyond that.  So if the patch is
doing a memcmp on the compressed data, I'd be inclined to get rid of
that part.
        regards, tom lane


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

Предыдущее
От: Andreas Karlsson
Дата:
Сообщение: Re: psql: Add \dL to show languages
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: log_hostname and pg_stat_activity