Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Questions 3 - 5 For each SQL query below, do the following: Write a query for the pg _ class table to get the number
Questions
For each SQL query below, do the following:
Write a query for the pgclass table to get the number of pages and tuples in each relation. Show the query and the results. No need to repeat answers if a table is used multiple times in the questions below. That is for each question, just get information about new tables.
List two types of joins that could be used for the query.
Using the formulas provided in the slides, calculate the cost of doing each type of join listed in b
Use EXPLAIN to identify which join algorithm postgresql uses. See Documentation: : EXPLAIN Also, see slide in Slides for for information about Explain
Report if your calculation of which join is cheapest matches postgresqls choice or not
Use workmem k to find # of buffer pages available to join Documentation: : Resource Consumption
Question points:
SELECT Afirst, Alast, Aclearanceid
FROM agent A securityclearance S
WHERE Aclearanceid Sscid
Question points:
SELECT Llanguage Llangid
FROM language L languagerel LR
WHERE Llangid LRlangid;
Question points:
SELECT Aagentid Aagentid
FROM agent A agent A
WHERE Asalary Asalary
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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 Started