L
L
Lexxtor2015-04-23 16:24:11
MySQL
Lexxtor, 2015-04-23 16:24:11

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

4 answer(s)
I
Immortal_pony, 2015-04-23
@Immortal_pony

Часто пишут что JOIN-ы тормозят, их надо убирать для оптимизации.

Lies.

H
He11ion, 2015-04-23
@He11ion

EXPLAIN to help you. And so as not to slow down - a competent orchanization of the database and indexes.

O
Oleg, 2015-04-23
@ollisso

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.

P
Puma Thailand, 2015-04-23
@opium

Do this and that and compare the results

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question