Question
Execute the following SQL and draw the query tree for the SQL. Describe what kinds of access methods are used for each table. Explain which
Execute the following SQL and draw the query tree for the SQL.
Describe what kinds of access methods are used for each table. Explain which join method is used in each join operation.
SELECT /*+ GATHER_PLAN_STATISTICS */ C.lname, S.address, Pr.name
FROM Customer C, Purchase Pu, Item I, Store S, Product Pr
WHERE C.id = Pu.cid AND Pu.pid = I.pid AND Pu.ino = I.no AND I.sid = S.id AND I.pid = Pr.id
AND C.fname = 'Tesla';
SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (format=>'ALLSTATS LAST'));
Step by Step Solution
3.49 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
For your SQL query you have the following tables and join conditions 1 Customer C is joined with Pur...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Database management systems
Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff
3rd edition
72465638, 978-0072465631
Students also viewed these Databases questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App