Answer the question
In order to leave comments, you need to log in
Is it possible to see how the sql query is processed?
Hello!
Perhaps the question is stupid, but I'm wondering if it's possible to somehow see how the request works, step by step.
Those. traversing tables, executing nested selects, exists, etc.
There is this request:
SELECT
`profiles`.*,
`edu_speciality_profile`.`edu_speciality_id` AS `pivot_edu_speciality_id`,
`edu_speciality_profile`.`profile_id` AS `pivot_profile_id`,
`edu_speciality_profile`.`id` AS `pivot_id`,
`edu_speciality_profile`.`max_year` AS `pivot_max_year`
FROM
`profiles`
INNER JOIN `edu_speciality_profile` ON `profiles`.`id` = `edu_speciality_profile`.`profile_id`
WHERE
`edu_speciality_profile`.`edu_speciality_id` IN(1) AND EXISTS(
SELECT
*
FROM
`edu_speciality_profile_year`
INNER JOIN `edu_speciality_profile` ON `edu_speciality_profile`.`id` = `edu_speciality_profile_year`.`edu_speciality_profile_id`
WHERE
`profiles`.`id` = `edu_speciality_profile`.`profile_id` AND `edu_speciality_profile`.`max_year` = `edu_speciality_profile_year`.`year` AND `edu_speciality_profile_year`.`distant` = 1
);
Answer the question
In order to leave comments, you need to log in
EXPLAIN - https://dev.mysql.com/doc/refman/8.0/en/explain.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question