[MDEV-9075] take into account other conditions when estimating selectivity Created: 2015-11-03  Updated: 2015-11-03  Resolved: 2015-11-03

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Fix Version/s: 10.0.6

Type: Task Priority: Major
Reporter: Sergei Golubchik Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

Say, the query is

SELECT ... FROM t1, t2 WHERE t1_a=t2_b AND t1_c=10 AND t1_d=20

When optimizer considers ref access for t1 using the index on t1_c, it uses records_in_range to estimate the number of rows that will be selected. But there is a second condition (on t1_d) and it will further limit the number of rows. Basically, the optimizer should understand that independently from the access method on t1 only those rows will be selected that match both conditions, and use this estimate, again, independently from the access method.



 Comments   
Comment by Sergei Golubchik [ 2015-11-03 ]

Already done as a part of engine independent table statistics

Generated at Thu Feb 08 07:31:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.