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.

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter12: Subqueries And Merge Statements
Section: Chapter Questions
Problem 19MC
icon
Related questions
Question

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.   

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning