summaryrefslogtreecommitdiff
path: root/sql/threadpool_common.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2022-10-17 16:44:10 -0700
committerIgor Babaev <igor@askmonty.org>2022-10-25 11:43:32 -0700
commit58cd0bd59ef011be54f162237f2ff017c3148e7b (patch)
tree7c6b5282b00ff9d9a509d85ff7d0ff996fa0d740 /sql/threadpool_common.cc
parentf1bbc1cd19d0d81fee5433efcb570a8845172241 (diff)
downloadmariadb-git-58cd0bd59ef011be54f162237f2ff017c3148e7b.tar.gz
MDEV-28846 Poor performance when rowid filter contains no elements
When a range rowid filter was used with an index ref access the cost of accessing the index entries for the records rejected by the filter was not taken into account. For a ref access by an index with big average number of records per key this led to poor execution plans if selectivity of the used filter was high. The patch resolves this problem. It also introduces a minor optimization that skips look-ups into a filter that turns out to be empty. With this patch the output of ANALYZE stmt reports the number of look-ups into used rowid filters. The patch also back-ports from 10.5 the code that properly sets the field TABLE::file::table for opened temporary tables. The test cases that were supposed to use rowid filters have been adjusted in order to use similar execution plans after this fix. Approved by Oleksandr Byelkin <sanja@mariadb.com>
Diffstat (limited to 'sql/threadpool_common.cc')
0 files changed, 0 insertions, 0 deletions