I have two select queries I want to combine for faster performance. I'm a bit confused as I'm not sure if I could use a JOIN
or LEFT JOIN
or something else to make it faster.
Here are the two queries I want to combine:
Query 1:
SELECT id FROM users WHERE email = :email LIMIT 1
Then, if that row exists from query 1, then run query 2:
SELECT * FROM settings WHERE id = :id_from_query_1
thank you for any kind of help!