Complete the code to show the actual execution plan of a query.
EXPLAIN [1] SELECT * FROM employees;The EXPLAIN ANALYZE command runs the query and shows the actual execution plan with timing.
Complete the code to get the execution time of a SELECT query on the products table.
EXPLAIN ANALYZE SELECT [1] FROM products WHERE price > 100;
Using * selects all columns, so the plan shows the full query execution.
Fix the error in the EXPLAIN ANALYZE command to run it correctly.
EXPLAIN ANALYZE [1] FROM orders;The EXPLAIN ANALYZE command must be followed by a valid SELECT, INSERT, UPDATE, or DELETE statement. Here, SELECT * is correct to query the table.
Fill both blanks to explain and analyze a query that counts rows in the sales table.
EXPLAIN [1] SELECT COUNT([2]) FROM sales;
Use ANALYZE to run the query and get actual execution details. Use * inside COUNT to count all rows.
Fill all three blanks to explain and analyze a query that selects names and filters by age in the users table.
EXPLAIN [1] SELECT name FROM users WHERE age [2] [3];
Use ANALYZE to run the query and get real execution info. The condition age > 30 filters users older than 30.