Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)

Поиск
Список
Период
Сортировка
Искать
От
Alexander Korotkov
Тема
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)
Дата
Msg-id
CAPpHfdsc0k5wH6NjnfcN1ZRu5TXYxEhu4PSXOQmdrRjO2eds2A@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Alexander Korotkov <aekorotkov@gmail.com>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Alexander Korotkov <aekorotkov@gmail.com>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Tom Lane <tgl@sss.pgh.pa.us>
On Fri, Sep 30, 2011 at 1:08 AM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
At every call, gtrgm_penalty() has to calculate the signature for newitem, using makesign(). That's an enormous waste of effort, but there's currently no way gtrgm_penalty() to avoid that. If we could call makesign() only on the first call in the loop, and remember it for the subsequent calls, that would eliminate the need for any micro-optimization in makesign() and make inserting into a trigram index much faster (including building the index from scratch)
Isn't it possible to cache signature of newitem in gtrgm_penalty like gtrgm_consistent do this for query?

------
With best regards,
Alexander Korotkov.
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Bruce Momjian
Дата:
Сообщение: Re: fix for pg_upgrade
FAQ