Answer the question
In order to leave comments, you need to log in
Is it worth getting rid of JOIN by adding a new SELECT to SQL?
There is a main table with ID of some objects from another table. We need to get the names of these objects.
They often write that JOINs slow down, they must be removed for optimization. So, in this case, is it better to get the names of objects by a separate SELECT or not?
Answer the question
In order to leave comments, you need to log in
Часто пишут что JOIN-ы тормозят, их надо убирать для оптимизации.
EXPLAIN to help you. And so as not to slow down - a competent orchanization of the database and indexes.
I had cases in my work when removing joins speeded up queries.
But this only came to light after hours of working with Explain. in 99% of cases - join is faster.
learn how to use explain.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question