Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)
От
Heikki Linnakangas
Тема
Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index
build)
Дата
Msg-id
4E04C099.3020604@enterprisedb.com
Ответ на
Re: WIP: Fast GiST index build (Heikki Linnakangas)
Список
Дерево обсуждения
WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index
build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Tom Lane <tgl@sss.pgh.pa.us>
Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Tom Lane <tgl@sss.pgh.pa.us>
Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST
index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) Tom Lane <tgl@sss.pgh.pa.us>
Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST
index build) Robert Haas <robertmhaas@gmail.com>
Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST
index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST
index build) Robert Haas <robertmhaas@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Optimizing box_penalty (Re: WIP: Fast GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Tom Lane <tgl@sss.pgh.pa.us>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Robert Haas <robertmhaas@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Robert Haas <robertmhaas@gmail.com>
Re: WIP: Fast GiST index build Oleg Bartunov <oleg@sai.msu.su>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Fast GiST index build - further improvements Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Fast GiST index build - further improvements Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Stefan Keller <sfkeller@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Stefan Keller <sfkeller@gmail.com>
Re: WIP: Fast GiST index build Robert Haas <robertmhaas@gmail.com>
Re: WIP: Fast GiST index build Stefan Keller <sfkeller@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Robert Haas <robertmhaas@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Hot standby and GiST page splits (was Re: WIP: Fast GiST
index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Simon Riggs <simon@2ndQuadrant.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Simon Riggs <simon@2ndQuadrant.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Simon Riggs <simon@2ndQuadrant.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Simon Riggs <simon@2ndQuadrant.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Simon Riggs <simon@2ndQuadrant.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Simon Riggs <simon@2ndQuadrant.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Thom Brown <thom@linux.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Simon Riggs <simon@2ndQuadrant.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Thom Brown <thom@linux.com>
Re: Hot standby and GiST page splits (was Re: WIP: Fast
GiST index build) Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Jesper Krogh <jesper@krogh.cc>
Re: WIP: Fast GiST index build Alexander Korotkov <aekorotkov@gmail.com>
Re: WIP: Fast GiST index build Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
On 24.06.2011 11:40, Heikki Linnakangas wrote: > On 21.06.2011 13:08, Alexander Korotkov wrote: >> I believe it's due to relatively expensive penalty >> method in that opclass. > > Hmm, I wonder if it could be optimized. I did a quick test, creating a > gist_trgm_ops index on a list of English words from > /usr/share/dict/words. oprofile shows that with the patch, 60% of the > CPU time is spent in the makesign() function. I couldn't resist looking into this, and came up with the attached patch. I tested this with: CREATE TABLE words (word text); COPY words FROM '/usr/share/dict/words'; CREATE INDEX i_words ON words USING gist (word gist_trgm_ops); And then ran "REINDEX INDEX i_words" a few times with and without the patch. Without the patch, reindex takes about 4.7 seconds. With the patch, 3.7 seconds. That's a worthwhile gain on its own, but becomes even more important with Alexander's fast GiST build patch, which calls the penalty function more. I used the attached showsign-debug.patch to verify that the patched makesign function produces the same results as the existing code. I haven't tested the big-endian code, however. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления
От: Bernd Helmle
Дата: