-
-
Save xaprb/a9daa2bd0fe7beca1265 to your computer and use it in GitHub Desktop.
A nonsense query that demonstrates various aspects of EXPLAIN.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXPLAIN | |
SELECT actor_id, | |
(SELECT 1 FROM sakila.film_actor WHERE film_actor.actor_id = | |
der_1.actor_id LIMIT 1) | |
FROM ( | |
SELECT actor_id | |
FROM sakila.actor LIMIT 5 | |
) AS der_1 | |
UNION ALL | |
SELECT film_id, | |
(SELECT @var1 FROM sakila.rental LIMIT 1) | |
FROM ( | |
SELECT film_id, | |
(SELECT 1 FROM sakila.store LIMIT 1) | |
FROM sakila.film LIMIT 5 | |
) AS der_2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment