Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There are six queries here for the DELLSTORE database, each involving a join involving some or all of the tables customers orders (invoices) orderlines (invoice_items)

There are six queries here for the DELLSTORE database, each involving a join involving some or all of the tables

customers

orders (invoices)

orderlines (invoice_items)

products (parts)

Information on the DELLSTORE database is below. You can enable a more vertical output format with the psql command \x on if you wish. For each of the queries below, 1-6, you should do the following regarding the Postgres query plan:

Give me the Postgres explain output that you get from your machine

Interpret this output to give me the exact join order (which may be a tree structure):

What is the first pair of tables joined? What is the algorithm?

What is the order of each subsequent join?

Answer the additional questions 2-6 (there is no additional question for join 1)

5)5. Range map on customer.zip (like #4 except on a different table) explain select p.title from products p join orderlines ol on p.prod_id = ol.prod_id join orders o on o.orderid = ol.orderid join customers c on c.customerid = o.customerid where c.zip between 60600 and 60699; Question 5: does an index on customers.zip change anything? If so, what? Create and drop the index with: create index zipdex on customers(zip); drop index zipdex;

http://pld.cs.luc.edu/courses/305/spr16/dellexplain.html

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions