Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
10.4.6
-
None
-
Mariadb 10.3 and 10.4
Description
Changing this ticket to be more correct taking into account some new info.
"Conversion of big predicated into subqueries" ( https://mariadb.com/kb/en/library/conversion-of-big-in-predicates-into-subqueries/ ) is making many queries using *specific pattern* especially on default configuration to degrade in performance over 100 fold in specific cases. Most of these can't be fixed by enabling hash joins using join_cache_limit = 8
While:
- These issues are catastrophic even on simplest queries and tiny tables
- Some issues can be partially fixed by reconfiguring the server or completely rewriting queries, leading to "bearable" performance degradation (<10 times slower)
- This "optimization" is very specific, only for IN sets witch >1000 items
- Degradation feels totally "random", simple data conversion between string and int can change 50x degradation into over 100x.
- All tests are still on very small tables, with very small IN (..) sets to keep this ticket as short as possible
- CPU overload caused by this on production machines can be huge
So adding a switch to turn this off, so it can be disabled for when it's causing issues seem necessary
https://jira.mariadb.org/browse/MDEV-12176
https://jira.mariadb.org/browse/MDEV-16871
https://jira.mariadb.org/browse/MDEV-17795
https://jira.mariadb.org/browse/MDEV-20083
Some of many cases will follow as separated comments as this is too large to add at once.
Attachments
Issue Links
- causes
-
MDEV-16871 in_predicate_conversion_threshold cannot be set in my.cnf
- Closed
-
MDEV-17795 Query with long IN(...) list in WHERE about 40 times slower
- Stalled
-
MDEV-20083 Predicate into subqueries is server KILLER, which can not even be disabled
- Closed
- is caused by
-
MDEV-12176 Transform [NOT] IN predicate with long list of values INTO [NOT] IN subquery.
- Closed
-
MDEV-20109 Optimizer ignores distinct key created for materialized semi-join subquery when searching for best execution plan
- Closed