Forum Discussion
Best Merge Queries Join Kind for Best Performance on below scenario
- Anonymous2 years ago
Hi vidhyasagar
Thanks for your quick reply, as you mentioned, the left join will return the results that match the left table, it seachs the related value from the right table, you can refer to the following picture.
The left table will return all value and the right table only return the related value, so most of its time is spent querying the right table, but fot the inner join, you can refer to the following picture.
It needs to query the data that meets the conditions in both tables, so it will query both tables.
So comare them, the left join will be better than inner join, especially if you have a large amount of data, the left join performance is higher than the inner join.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your time , but in the video i provided , they are mentioning inner join looks for matching rows in both table (from left table to right table once and from right table to left table once) , while left join will look for matching rows from left table to right table once only, using query diagnostics the inner join is taking more time than left join , so best performant is left join ?
Hi vidhyasagar
Thanks for your quick reply, as you mentioned, the left join will return the results that match the left table, it seachs the related value from the right table, you can refer to the following picture.
The left table will return all value and the right table only return the related value, so most of its time is spent querying the right table, but fot the inner join, you can refer to the following picture.
It needs to query the data that meets the conditions in both tables, so it will query both tables.
So comare them, the left join will be better than inner join, especially if you have a large amount of data, the left join performance is higher than the inner join.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.