I would like to see point #2 of the following email addressed before commit. As things stand, it is not clear (at least to me) whether this is a win.
Reimplementation of ginInsertRecordBA reduces difference of HEAD and HEAD+rbtree in regular case.
Test suite is taken from http://www.sai.msu.su/~megera/wiki/2009-04-03: SEQ: SELECT array_to_string(ARRAY(select '' || a || '.' || b from generate_series(1,50) b), ' ')::tsvector AS i INTO foo FROM generate_series(1,100000) a; RND: SELECT array_to_string(ARRAY(select '' || random() from generate_series(1,50) b), ' ')::tsvector AS i INTO foo FROM generate_series(1,100000) a; Times in seconds: HEAD 0.9 0.11 SEQ 130 113 111 RND 11.4 12.6 11.5The ides was to change order of insertion - now insertion order decreases number of rebalancing.
Oleg's test (http://www.sai.msu.su/~megera/wiki/rbtree_test) are made with v0.10 which is differ from 0.11 only by comments around ginInsertRecordBA()
-- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/
rbtree-0.11.gz
Description: Unix tar archive
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers