Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1987

How to Tune SQL statement with Transitive Dependency Improvement for MySQL?

$
0
0
The following is an example shows a SQL statement with two conditions “emp_dept=dpt_id and emp_dept<'L'” .

select * from employee, department
where emp_dept=dpt_id
and emp_dept<'L'
and emp_id<1500000
and emp_salary= dpt_avg_salary​
order by dpt_avg_salary

Here the following is the query plan of this SQL in Tosska proprietary tree format, it takes 8.84 seconds to finish.
[​IMG]
The query plan looks...

How to Tune SQL statement with Transitive Dependency Improvement for MySQL?

Viewing all articles
Browse latest Browse all 1987

Trending Articles