Re: Compressed TOAST Slicing

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Compressed TOAST Slicing
Дата
Msg-id eee6e817-29bd-451f-8105-2d4bb3e2aedc@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Compressed TOAST Slicing  (Paul Ramsey <pramsey@cleverelephant.ca>)
Список pgsql-hackers
    Paul Ramsey wrote:

> > text_starts_with(arg1,arg2) in varlena.c does a full decompression
> > of  arg1 when it could limit itself to the length of the smaller arg2:
>
> Nice catch, I didn't find that one as it's not user visible, seems to
> be only called in spgist (!!)

It's also exposed in SQL since v11, as
  starts_with(string,prefix) returns bool
and as an operator:
  text ^@ text
I guess it's meant to be more efficient than (string LIKE prefix||'%')
or strpos(string,prefix)=1, and it will be even more so if we can
avoid some amount of decompression :)


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: BRIN summarize autovac_report_workitem passes datname as relname
Следующее
От: Robert Haas
Дата:
Сообщение: Re: bgwriter_lru_maxpages limits in PG 10 sample conf