Discussion:
speedup tidbitmap patch: hash BlockNumber
Teodor Sigaev
2014-10-22 13:14:43 UTC
Permalink
Just replace tag_hash in tidbitmap which uses hash_any to direct call of
hash_uint32, it saves ~5% of execution time.

An example:
# create extension btree_gin;
# select (v / 10)::int4 as i into t from generate_series(1, 5000000) as v;
# create index idx on t using gin (i);
# set enable_seqscan = off;

# explain analyze select * from t where i >= 0;
without patch: Execution time: 2427.692 ms
with patch: Execution time: 2319.376 ms

# explain analyze select * from t where i >= 100 and i<= 100;
without patch: Execution time: 524.441 ms
with patch: Execution time: 504.478 ms
--
Teodor Sigaev E-mail: ***@sigaev.ru
WWW: http://www.sigaev.ru/
Loading...