Kouhei Sutou
null+****@clear*****
Tue Nov 17 21:32:23 JST 2015
Kouhei Sutou 2015-11-17 21:32:23 +0900 (Tue, 17 Nov 2015) New Revision: 0763d91a8a022be887863ff51faac6aa6603cef3 https://github.com/groonga/groonga/commit/0763d91a8a022be887863ff51faac6aa6603cef3 Message: logical_range_filter: reduce sample ratio Modified files: plugins/sharding/logical_range_filter.rb Modified: plugins/sharding/logical_range_filter.rb (+2 -1) =================================================================== --- plugins/sharding/logical_range_filter.rb 2015-11-17 18:24:13 +0900 (d4dc14b) +++ plugins/sharding/logical_range_filter.rb 2015-11-17 21:32:23 +0900 (6ccbe86) @@ -583,7 +583,8 @@ module Groonga max_n_unmatched_records = limit * 100 max_n_sample_records = data_table_size if max_n_sample_records > 10000 - max_n_sample_records = (max_n_sample_records / 100).ceil + sample_ratio = 1 / (Math.log(data_table_size) ** 2) + max_n_sample_records = (max_n_sample_records * sample_ratio).ceil end if max_n_unmatched_records > max_n_sample_records max_n_unmatched_records = max_n_sample_records -------------- next part -------------- HTML����������������������������...다운로드