mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed LP bug #698882.
Made sure that the optimal fields are used by TABLE_REF objects when building index access keys to joined tables. Fixed a bug in the template function that sorts the elements of a list using the bubble sort algorithm. The bug caused poor performance of the function. Also added an optimization that skips comparison with the most heavy elements that has been already properly placed in the list. Made the comparison of the fields belonging to the same Item_equal more granular: fields belonging to the same table are also ordered according to some rules.
This commit is contained in:
@ -1733,7 +1733,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.package_id 1
|
||||
1 SIMPLE t4 eq_ref PRIMARY,id PRIMARY 2 test.t1.carrier 1 Using where
|
||||
1 SIMPLE t5 ref carrier_id carrier_id 5 test.t4.id 22 Using index
|
||||
1 SIMPLE t3 ref package_id package_id 5 test.t1.id 1 Using where; Using index
|
||||
1 SIMPLE t3 ref package_id package_id 5 test.t2.package_id 1 Using index
|
||||
SELECT COUNT(*)
|
||||
FROM ((t2 JOIN t1 ON t2.package_id = t1.id)
|
||||
JOIN t3 ON t3.package_id = t1.id)
|
||||
|
Reference in New Issue
Block a user