diff options
author | Monty <monty@mariadb.org> | 2023-02-12 14:53:47 +0200 |
---|---|---|
committer | Sergei Petrunia <sergey@mariadb.com> | 2023-02-21 15:35:27 +0300 |
commit | 3c1b7fb03e35c4685f797f9ca410e15ae20c62cd (patch) | |
tree | 71b9d3de33f187884d5d15d9ef05b9fab784f2f7 /mysql-test/include | |
parent | 9c401c8c39368ca8d8ef04105820db1174d52ab7 (diff) | |
download | mariadb-git-3c1b7fb03e35c4685f797f9ca410e15ae20c62cd.tar.gz |
Adjust costs for rowid filter
- Use log2() insted of log()
- Added missing ''+' when calculating rowid setup cost
- Adjusted ROWID_FILTER_PER_ELEMENT_MODIFIER (from 3 to 1)
Other things:
- Adjusted cost for index_merge where rows_out < 1.0
The effects of the changes:
- rowid filter will have higher setup cost
- rowid filter will have slightly less costs per row
This can be seen in mtr where some tests, with 'small tables or
that uses rowid filters with many rows, will not use rowid filter anymore.
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/rowid_filter_debug_kill.inc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/mysql-test/include/rowid_filter_debug_kill.inc b/mysql-test/include/rowid_filter_debug_kill.inc index c672954fc7c..230bef6d10c 100644 --- a/mysql-test/include/rowid_filter_debug_kill.inc +++ b/mysql-test/include/rowid_filter_debug_kill.inc @@ -9,9 +9,6 @@ --echo # MDEV-22761 KILL QUERY during rowid_filter, crashes --echo # -create table t1(a int); -insert into t1 select seq from seq_1_to_1000; - create table t2(a int); insert into t2 select seq from seq_1_to_100; @@ -30,17 +27,17 @@ where table_schema=database() and table_name='t3'; analyze table t2,t3; explain -select * from t2, t3 +select straight_join * from t2, t3 where - t3.key1=t2.a and t3.key2 in (2,3,4,5,6,7,8,9,10); + t3.key1=t2.a and t3.key2 between 2 and 10; let $target_id= `select connection_id()`; set debug_sync='handler_rowid_filter_check SIGNAL at_rowid_filter_check WAIT_FOR go'; send -select * from t2, t3 +select straight_join * from t2, t3 where - t3.key1=t2.a and t3.key2 in (2,3,4,5,6,7,8,9,10); + t3.key1=t2.a and t3.key2 between 2 and 10; connect (con1, localhost, root,,); set debug_sync='now WAIT_FOR at_rowid_filter_check'; @@ -54,5 +51,5 @@ disconnect con1; reap; set debug_sync='RESET'; -drop table t1,t2,t3; +drop table t2,t3; --source include/wait_until_count_sessions.inc |