Given the example SQL command below to do the following join: Select * from leftTable LEFT JOIN rightTable ON leftTable.column1 = rightTable.column1 What is one example thing you can create in your database to either avoid having to do the above join or reduce the cost of it? Here are 3 example ideas to consider but if you choose one of these, describe exactly how it would avoid or reduce the cost of the above join: creating an index on certain columns in the tables, creating another table, or replacing the 2 tables used in the join with a different table. If you create what you described in your answer to #3, describe an example SQL command that would then be more expensive than if your answer to #3 was not created in your database. This question is meant to get you thinking about the fact that it’s usually impossible to optimize your database for every possible SQL operation someone might do in your database so you need to make an educated guess on what types of SQL commands users will be doing most often (or ask your users if possible) and optimize for those.
Given the example SQL command below to do the following join:
Select * from leftTable LEFT JOIN rightTable ON leftTable.column1 = rightTable.column1
What is one example thing you can create in your
If you create what you described in your answer to #3, describe an example SQL command that would then be more expensive than if your answer to #3 was not created in your database. This question is meant to get you thinking about the fact that it’s usually impossible to optimize your database for every possible SQL operation someone might do in your database so you need to make an educated guess on what types of SQL commands users will be doing most often (or ask your users if possible) and optimize for those.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images