Question: Problem 1 : Indexing ( 4 0 % ) In this task, you will be asked to i ) select suitable indexes to speed up
Problem : Indexing
In this task, you will be asked to i select suitable indexes to speed up query performance and ii examine the query plan of an SQL query.
We are going to use a new database called flight attached in Azip. In the database, there is a single table, called flights. The following shows its schema:
flights fid year, monthid dayofmonth, dayofweekid carrierid flightnum, origincity, originstate, destcity, deststate, departuredelay, taxiout, arrivaldelay, canceled,
distance
Note that this task only needs to use four attributes: carrierid origincity, actualtime, and destcity.
Follow the steps to create and load the flights database:
with command line:
In your terminal, enter the A folder where the flightpgsql locates
Create a database named flight createdb U your username flight
Run command: psql U your usernamed flight f flightpgsql
It may take a long time to insert all data.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
