Slackbot
11/06/2023, 9:37 AMJohn Tosas
11/06/2023, 2:01 PMSELECT * FROM users AS user ... WHERE user.id='123'
with a bunch of LEFT JOINS will definitely be optimized by any modern database to only do the joins after applying the index on id
on the users
table. But if you change the WHERE
condition to anything that is not an identifier/indexed attribute, the problem will exist for non-unique values.Adam Furmanek
11/06/2023, 3:09 PMAdam Furmanek
11/06/2023, 3:09 PM