0% found this document useful (0 votes)
2 views40 pages

Lecture4 Advanced SQL MCQ Final

The document outlines various advanced SQL queries and optimization techniques, categorized by difficulty levels: Easy, Moderate, and Difficult. It includes a series of questions related to SQL concepts such as nested queries, indexes, and set operations, along with their respective correct answers. The content serves as a comprehensive guide for understanding and applying advanced SQL concepts effectively.

Uploaded by

anuraggupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views40 pages

Lecture4 Advanced SQL MCQ Final

The document outlines various advanced SQL queries and optimization techniques, categorized by difficulty levels: Easy, Moderate, and Difficult. It includes a series of questions related to SQL concepts such as nested queries, indexes, and set operations, along with their respective correct answers. The content serves as a comprehensive guide for understanding and applying advanced SQL concepts effectively.

Uploaded by

anuraggupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 40

# Subject Topic Difficulty

Advanced SQL & Query


1 DBMS Optimization Easy

Advanced SQL & Query


2 DBMS Optimization Easy

Advanced SQL & Query


3 DBMS Optimization Easy

Advanced SQL & Query


4 DBMS Optimization Easy

Advanced SQL & Query


5 DBMS Optimization Easy

Advanced SQL & Query


6 DBMS Optimization Easy

Advanced SQL & Query


7 DBMS Optimization Easy

Advanced SQL & Query


8 DBMS Optimization Easy

Advanced SQL & Query


9 DBMS Optimization Easy

Advanced SQL & Query


10 DBMS Optimization Easy
Advanced SQL & Query
11 DBMS Optimization Easy

Advanced SQL & Query


12 DBMS Optimization Easy

Advanced SQL & Query


13 DBMS Optimization Easy

Advanced SQL & Query


14 DBMS Optimization Easy

Advanced SQL & Query


15 DBMS Optimization Easy

Advanced SQL & Query


16 DBMS Optimization Easy

Advanced SQL & Query


17 DBMS Optimization Easy

Advanced SQL & Query


18 DBMS Optimization Easy

Advanced SQL & Query


19 DBMS Optimization Easy

Advanced SQL & Query


20 DBMS Optimization Easy
Advanced SQL & Query
21 DBMS Optimization Easy

Advanced SQL & Query


22 DBMS Optimization Easy

Advanced SQL & Query


23 DBMS Optimization Easy

Advanced SQL & Query


24 DBMS Optimization Easy

Advanced SQL & Query


25 DBMS Optimization Easy

Advanced SQL & Query


26 DBMS Optimization Easy

Advanced SQL & Query


27 DBMS Optimization Easy

Advanced SQL & Query


28 DBMS Optimization Easy

Advanced SQL & Query


29 DBMS Optimization Easy

Advanced SQL & Query


30 DBMS Optimization Easy
Advanced SQL & Query
31 DBMS Optimization Easy

Advanced SQL & Query


32 DBMS Optimization Easy

Advanced SQL & Query


33 DBMS Optimization Easy

Advanced SQL & Query


34 DBMS Optimization Easy

Advanced SQL & Query


35 DBMS Optimization Easy

Advanced SQL & Query


36 DBMS Optimization Easy

Advanced SQL & Query


37 DBMS Optimization Easy

Advanced SQL & Query


38 DBMS Optimization Easy

Advanced SQL & Query


39 DBMS Optimization Easy

Advanced SQL & Query


40 DBMS Optimization Easy
Advanced SQL & Query
41 DBMS Optimization Moderate

Advanced SQL & Query


42 DBMS Optimization Moderate

Advanced SQL & Query


43 DBMS Optimization Moderate

Advanced SQL & Query


44 DBMS Optimization Moderate

Advanced SQL & Query


45 DBMS Optimization Moderate

Advanced SQL & Query


46 DBMS Optimization Moderate

Advanced SQL & Query


47 DBMS Optimization Moderate

Advanced SQL & Query


48 DBMS Optimization Moderate

Advanced SQL & Query


49 DBMS Optimization Moderate

Advanced SQL & Query


50 DBMS Optimization Moderate
Advanced SQL & Query
51 DBMS Optimization Moderate

Advanced SQL & Query


52 DBMS Optimization Moderate

Advanced SQL & Query


53 DBMS Optimization Moderate

Advanced SQL & Query


54 DBMS Optimization Moderate

Advanced SQL & Query


55 DBMS Optimization Moderate

Advanced SQL & Query


56 DBMS Optimization Moderate

Advanced SQL & Query


57 DBMS Optimization Moderate

Advanced SQL & Query


58 DBMS Optimization Moderate

Advanced SQL & Query


59 DBMS Optimization Moderate

Advanced SQL & Query


60 DBMS Optimization Moderate
Advanced SQL & Query
61 DBMS Optimization Moderate

Advanced SQL & Query


62 DBMS Optimization Moderate

Advanced SQL & Query


63 DBMS Optimization Moderate

Advanced SQL & Query


64 DBMS Optimization Moderate

Advanced SQL & Query


65 DBMS Optimization Moderate

Advanced SQL & Query


66 DBMS Optimization Moderate

Advanced SQL & Query


67 DBMS Optimization Moderate

Advanced SQL & Query


68 DBMS Optimization Moderate

Advanced SQL & Query


69 DBMS Optimization Moderate

Advanced SQL & Query


70 DBMS Optimization Moderate
Advanced SQL & Query
71 DBMS Optimization Moderate

Advanced SQL & Query


72 DBMS Optimization Moderate

Advanced SQL & Query


73 DBMS Optimization Moderate

Advanced SQL & Query


74 DBMS Optimization Moderate

Advanced SQL & Query


75 DBMS Optimization Moderate

Advanced SQL & Query


76 DBMS Optimization Difficult

Advanced SQL & Query


77 DBMS Optimization Difficult

Advanced SQL & Query


78 DBMS Optimization Difficult

Advanced SQL & Query


79 DBMS Optimization Difficult

Advanced SQL & Query


80 DBMS Optimization Difficult
Advanced SQL & Query
81 DBMS Optimization Difficult

Advanced SQL & Query


82 DBMS Optimization Difficult

Advanced SQL & Query


83 DBMS Optimization Difficult

Advanced SQL & Query


84 DBMS Optimization Difficult

Advanced SQL & Query


85 DBMS Optimization Difficult

Advanced SQL & Query


86 DBMS Optimization Difficult

Advanced SQL & Query


87 DBMS Optimization Difficult

Advanced SQL & Query


88 DBMS Optimization Difficult

Advanced SQL & Query


89 DBMS Optimization Difficult

Advanced SQL & Query


90 DBMS Optimization Difficult
Advanced SQL & Query
91 DBMS Optimization Difficult

Advanced SQL & Query


92 DBMS Optimization Difficult

Advanced SQL & Query


93 DBMS Optimization Difficult

Advanced SQL & Query


94 DBMS Optimization Difficult

Advanced SQL & Query


95 DBMS Optimization Difficult

Advanced SQL & Query


96 DBMS Optimization Difficult

Advanced SQL & Query


97 DBMS Optimization Difficult

Advanced SQL & Query


98 DBMS Optimization Difficult

Advanced SQL & Query


99 DBMS Optimization Difficult

Advanced SQL & Query


100 DBMS Optimization Difficult
Question

What does a nested query mean in SQL?

Which SQL clause is used to combine results of two quer

What is the purpose of an index in a database?

Which set operation returns rows that are in the first q

Which keyword is used to remove duplicate rows from a

A correlated subquery depends on values from which of

Which of the following is NOT a set operation in SQL?

An index in SQL is primarily used to improve the perfor

Which operator returns rows common to both SELECT s

Which SQL statement removes duplicate rows from the r


What does a nested query mean in SQL?

Which SQL clause is used to combine results of two quer

What is the purpose of an index in a database?

Which set operation returns rows that are in the first q

Which keyword is used to remove duplicate rows from a

A correlated subquery depends on values from which of

Which of the following is NOT a set operation in SQL?

An index in SQL is primarily used to improve the perfor

Which operator returns rows common to both SELECT s

Which SQL statement removes duplicate rows from the r


What does a nested query mean in SQL?

Which SQL clause is used to combine results of two quer

What is the purpose of an index in a database?

Which set operation returns rows that are in the first q

Which keyword is used to remove duplicate rows from a

A correlated subquery depends on values from which of

Which of the following is NOT a set operation in SQL?

An index in SQL is primarily used to improve the perfor

Which operator returns rows common to both SELECT s

Which SQL statement removes duplicate rows from the r


What does a nested query mean in SQL?

Which SQL clause is used to combine results of two quer

What is the purpose of an index in a database?

Which set operation returns rows that are in the first q

Which keyword is used to remove duplicate rows from a

A correlated subquery depends on values from which of

Which of the following is NOT a set operation in SQL?

An index in SQL is primarily used to improve the perfor

Which operator returns rows common to both SELECT s

Which SQL statement removes duplicate rows from the r


Which of the following best describes a correlated subq

Which of these is TRUE about the MINUS operation in S

Which index type is most suitable for columns with many

What does an execution plan provide for a SQL query?

Which join type can lead to a Cartesian product if not fi

What is the effect of creating an index on a table colum

Which query will return rows present in either table but

Which method is best to optimize a query with multiple j

How does a correlated subquery affect query performa

Which of these can help identify inefficient SQL queries?


Which of the following best describes a correlated subq

Which of these is TRUE about the MINUS operation in S

Which index type is most suitable for columns with many

What does an execution plan provide for a SQL query?

Which join type can lead to a Cartesian product if not fi

What is the effect of creating an index on a table colum

Which query will return rows present in either table but

Which method is best to optimize a query with multiple j

How does a correlated subquery affect query performa

Which of these can help identify inefficient SQL queries?


Which of the following best describes a correlated subq

Which of these is TRUE about the MINUS operation in S

Which index type is most suitable for columns with many

What does an execution plan provide for a SQL query?

Which join type can lead to a Cartesian product if not fi

What is the effect of creating an index on a table colum

Which query will return rows present in either table but

Which method is best to optimize a query with multiple j

How does a correlated subquery affect query performa

Which of these can help identify inefficient SQL queries?


Which of the following best describes a correlated subq

Which of these is TRUE about the MINUS operation in S

Which index type is most suitable for columns with many

What does an execution plan provide for a SQL query?

Which join type can lead to a Cartesian product if not fi

You have a query with nested correlated subqueries that

Given two tables without indexes, joining them results in

An execution plan shows a full table scan instead of in

In query optimization, what does 'cost-based optimizat

Which scenario best describes the downside of using bi


A correlated subquery references a column with many N

Which of the following can cause an execution plan to

Explain the concept of 'join elimination' in query optimiz

What is the impact of using functions on indexed colum

Which of the following explains the difference between

You have a query with nested correlated subqueries that

Given two tables without indexes, joining them results in

An execution plan shows a full table scan instead of in

In query optimization, what does 'cost-based optimizat

Which scenario best describes the downside of using bi


A correlated subquery references a column with many N

Which of the following can cause an execution plan to

Explain the concept of 'join elimination' in query optimiz

What is the impact of using functions on indexed colum

Which of the following explains the difference between

You have a query with nested correlated subqueries that

Given two tables without indexes, joining them results in

An execution plan shows a full table scan instead of in

In query optimization, what does 'cost-based optimizat

Which scenario best describes the downside of using bi


Options Correct Answer

A. A query within anset operation query


B. A query without conditions
C. A query that returns multiple rows
D. A query with only one table A

A. UNION
B. JOIN
C. INTERSECT
D. MINUS A

A. Reduce disk space


B. Encrypt data
C. Speed up data retrieval
D. Increase data redundancy C

A. MINUS
B. UNION
C. INTERSECT
D. JOIN A

A. PRIMARY
B. DISTINCT
C. UNION
D. UNIQUE B

A. Index
B. Inner query
C. Outer query
D. Temporary table C

A. JOIN
B. UNION
C. INTERSECT
D. MINUS A

A. SELECT queries
B. DELETE operations
C. UPDATE operations
D. INSERT operations A

A. INTERSECT
B. UNION
C. EXCEPT
D. MINUS A

A. SELECT DISTINCT
B. SELECT UNIQUE
C. SELECT DIFFERENT
D. SELECT ALL A
A. A query within anset operation query
B. A query that returns multiple rows
C. A query without conditions
D. A query with only one table A

A. MINUS
B. JOIN
C. UNION
D. INTERSECT C

A. Reduce disk space


B. Encrypt data
C. Speed up data retrieval
D. Increase data redundancy C

A. UNION
B. MINUS
C. INTERSECT
D. JOIN B

A. DISTINCT
B. UNIQUE
C. UNION
D. PRIMARY A

A. Outer query
B. Inner query
C. Index
D. Temporary table A

A. UNION
B. INTERSECT
C. JOIN
D. MINUS C

A. DELETE operations
B. SELECT queries
C. UPDATE operations
D. INSERT operations B

A. INTERSECT
B. UNION
C. EXCEPT
D. MINUS A

A. SELECT DIFFERENT
B. SELECT UNIQUE
C. SELECT ALL
D. SELECT DISTINCT D
A. A query with only one table
B. A query without conditions
C. A query that returns multiple rows
D. A query within anset operation query D

A. MINUS
B. JOIN
C. UNION
D. INTERSECT C

A. Reduce disk space


B. Speed up data retrieval
C. Encrypt data
D. Increase data redundancy B

A. MINUS
B. INTERSECT
C. UNION
D. JOIN A

A. DISTINCT
B. UNION
C. UNIQUE
D. PRIMARY A

A. Outer query
B. Temporary table
C. Inner query
D. Index A

A. UNION
B. MINUS
C. JOIN
D. INTERSECT C

A. SELECT queries
B. INSERT operations
C. DELETE operations
D. UPDATE operations A

A. EXCEPT
B. INTERSECT
C. MINUS
D. UNION B

A. SELECT DIFFERENT
B. SELECT UNIQUE
C. SELECT DISTINCT
D. SELECT ALL C
A. A query that returns multiple rows
B. A query with only one table
C. A query without conditions
D. A query within anset operation query D

A. INTERSECT
B. UNION
C. MINUS
D. JOIN B

A. Reduce disk space


B. Increase data redundancy
C. Encrypt data
D. Speed up data retrieval D

A. JOIN
B. MINUS
C. UNION
D. INTERSECT B

A. DISTINCT
B. PRIMARY
C. UNIQUE
D. UNION A

A. Index
B. Inner query
C. Temporary table
D. Outer query D

A. UNION
B. JOIN
C. INTERSECT
D. MINUS B

A. INSERT operations
B. DELETE operations
C. SELECT queries
D. UPDATE operations C

A. EXCEPT
B. INTERSECT
C. MINUS
D. UNION B

A. SELECT ALL
B. SELECT DISTINCT
C. SELECT UNIQUE
D. SELECT DIFFERENT B
A. Returns multiple rows always
B. Executes once per row of the outer query
C. Executes independently of outer query
D. Cannot reference outer query columns B

A. Returns rows from first query not in second


B. Joins two tables
C. Returns all rows from both queries
D. Returns rows common to both queries A

A. Bitmap index
B. Hash index
C. Full-text index
D. B-tree index D

A. Step-by-step operations of query execution


B. Temporary data storage
C. SQL syntax validation
D. Data definition commands A

A. INNER JOIN
B. LEFT JOIN
C. CROSS JOIN
D. RIGHT JOIN C

A. Removes duplicate rows


B. Reduces storage size
C. Faster INSERT operations
D. Faster SELECT queries D

A. SELECT * FROM A INTERSECT SELECT * FROM B


B. SELECT * FROM A MINUS SELECT * FROM B
C. SELECT * FROM A UNION SELECT * FROM B
D. (SELECT * FROM A UNION SELECT * FROM B) MINUS
(SELECT * FROM A INTERSECT SELECT * FROM B) D

A. Use indexes on join columns


B. Use correlated subqueries
C. Avoid using indexes
D. Use CROSS JOIN A

A. No difference
B. Correlated subqueries are deprecated
C. Usually faster because it executes once
D. Usually slower due to repeated execution per outer row D

A. Using SELECT * always


B. Analyzing the execution plan
C. Ignoring indexes
D. Checking table size only B
A. Executes once per row of the outer query
B. Executes independently of outer query
C. Returns multiple rows always
D. Cannot reference outer query columns A

A. Returns all rows from both queries


B. Returns rows common to both queries
C. Returns rows from first query not in second
D. Joins two tables C

A. B-tree index
B. Bitmap index
C. Full-text index
D. Hash index A

A. Step-by-step operations of query execution


B. SQL syntax validation
C. Data definition commands
D. Temporary data storage A

A. CROSS JOIN
B. RIGHT JOIN
C. LEFT JOIN
D. INNER JOIN A

A. Faster SELECT queries


B. Reduces storage size
C. Faster INSERT operations
D. Removes duplicate rows A

A. SELECT * FROM A MINUS SELECT * FROM B


B. SELECT * FROM A UNION SELECT * FROM B
C. (SELECT * FROM A UNION SELECT * FROM B) MINUS
(SELECT * FROM A INTERSECT SELECT * FROM B)
D. SELECT * FROM A INTERSECT SELECT * FROM B C

A. Use correlated subqueries


B. Avoid using indexes
C. Use indexes on join columns
D. Use CROSS JOIN C

A. Correlated subqueries are deprecated


B. Usually slower due to repeated execution per outer row
C. No difference
D. Usually faster because it executes once B

A. Ignoring indexes
B. Using SELECT * always
C. Analyzing the execution plan
D. Checking table size only C
A. Executes independently of outer query
B. Executes once per row of the outer query
C. Cannot reference outer query columns
D. Returns multiple rows always B

A. Returns rows common to both queries


B. Returns rows from first query not in second
C. Returns all rows from both queries
D. Joins two tables B

A. Hash index
B. Bitmap index
C. Full-text index
D. B-tree index D

A. Step-by-step operations of query execution


B. SQL syntax validation
C. Data definition commands
D. Temporary data storage A

A. LEFT JOIN
B. CROSS JOIN
C. INNER JOIN
D. RIGHT JOIN B

A. Removes duplicate rows


B. Faster SELECT queries
C. Faster INSERT operations
D. Reduces storage size B

A. SELECT * FROM A INTERSECT SELECT * FROM B


B. SELECT * FROM A MINUS SELECT * FROM B
C. SELECT * FROM A UNION SELECT * FROM B
D. (SELECT * FROM A UNION SELECT * FROM B) MINUS
(SELECT * FROM A INTERSECT SELECT * FROM B) D

A. Use correlated subqueries


B. Avoid using indexes
C. Use indexes on join columns
D. Use CROSS JOIN C

A. Correlated subqueries are deprecated


B. Usually slower due to repeated execution per outer row
C. No difference
D. Usually faster because it executes once B

A. Analyzing the execution plan


B. Checking table size only
C. Ignoring indexes
D. Using SELECT * always A
A. Executes independently of outer query
B. Returns multiple rows always
C. Executes once per row of the outer query
D. Cannot reference outer query columns C

A. Returns rows from first query not in second


B. Returns all rows from both queries
C. Joins two tables
D. Returns rows common to both queries A

A. Hash index
B. B-tree index
C. Full-text index
D. Bitmap index B

A. Temporary data storage


B. SQL syntax validation
C. Data definition commands
D. Step-by-step operations of query execution D

A. RIGHT JOIN
B. LEFT JOIN
C. CROSS JOIN
D. INNER JOIN C

A. Rewrite subqueries as JOINs where possible


B. Use CROSS JOINs instead
C. Increase database cache size
D. Add unnecessary indexes A

A. Rewrite query to use nested subqueries


B. Use DISTINCT to reduce rows
C. Remove WHERE conditions
D. Create indexes on join columns D

A. The index is unique


B. The index is not selective enough or outdated statistics
C. The table is empty
D. The query uses WHERE clause B

A. Executing all plans and choosing fastest


B. Choosing query plan with lowest estimated resource cost
C. Ignoring indexes
D. Using heuristics only B

A. Cannot be used in read-only databases


B. Require more storage than B-tree
C. Slow for equality searches
D. Poor performance on high-cardinality columns D
A. Potentially slower due to NULL handling and repeated
execution
B. Faster because NULLs are ignored
C. No impact
D. Query optimizer removes NULL rows A

A. Adding comments to SQL


B. Using aliases
C. Updated table statistics
D. Changing column names C

A. Replacing joins with UNION


B. Forcing nested loops join
C. Joining tables without conditions
D. Removing unnecessary joins when data is redundant D

A. Index is not used, causing full scan


B. Index usage is unaffected
C. Query is faster
D. Functions are optimized automatically A

A. Hash join is deprecated


B. Hash join is always faster
C. Nested loops join is good for small datasets; hash join is
efficient for large datasets
D. Nested loops join uses hashing C

A. Use CROSS JOINs instead


B. Increase database cache size
C. Rewrite subqueries as JOINs where possible
D. Add unnecessary indexes C

A. Remove WHERE conditions


B. Use DISTINCT to reduce rows
C. Rewrite query to use nested subqueries
D. Create indexes on join columns D

A. The query uses WHERE clause


B. The index is unique
C. The index is not selective enough or outdated statistics
D. The table is empty C

A. Ignoring indexes
B. Executing all plans and choosing fastest
C. Using heuristics only
D. Choosing query plan with lowest estimated resource cost D

A. Slow for equality searches


B. Cannot be used in read-only databases
C. Poor performance on high-cardinality columns
D. Require more storage than B-tree C
A. Potentially slower due to NULL handling and repeated
execution
B. Query optimizer removes NULL rows
C. Faster because NULLs are ignored
D. No impact A

A. Using aliases
B. Changing column names
C. Adding comments to SQL
D. Updated table statistics D

A. Joining tables without conditions


B. Replacing joins with UNION
C. Forcing nested loops join
D. Removing unnecessary joins when data is redundant D

A. Index usage is unaffected


B. Index is not used, causing full scan
C. Query is faster
D. Functions are optimized automatically B

A. Hash join is deprecated


B. Nested loops join uses hashing
C. Nested loops join is good for small datasets; hash join is
efficient for large datasets
D. Hash join is always faster C

A. Rewrite subqueries as JOINs where possible


B. Add unnecessary indexes
C. Use CROSS JOINs instead
D. Increase database cache size A

A. Use DISTINCT to reduce rows


B. Create indexes on join columns
C. Remove WHERE conditions
D. Rewrite query to use nested subqueries B

A. The index is not selective enough or outdated statistics


B. The index is unique
C. The table is empty
D. The query uses WHERE clause A

A. Using heuristics only


B. Executing all plans and choosing fastest
C. Ignoring indexes
D. Choosing query plan with lowest estimated resource cost D

A. Require more storage than B-tree


B. Cannot be used in read-only databases
C. Slow for equality searches
D. Poor performance on high-cardinality columns D
Explanation Tag

A nested query is a query embedded inside anset operation q Nested queries / Correlated subqueries

UNION combines the results of two queries and removes dupliSet operations

Indexes speed up query execution by allowing faster data loo Query optimization

MINUS returns rows from the first query that do not appear inSet operations

DISTINCT removes duplicate rows from query results. Query

Correlated subqueries reference columns from the outer querNested queries / Correlated subqueries

JOIN is not a set operation; it combines columns from two tablSet operations

Indexes improve SELECT query performance by enabling fasterQuery optimization

INTERSECT returns rows present in both SELECT results. Set operations

SELECT DISTINCT removes duplicates from the query output. Set operations
A nested query is a query embedded inside anset operation q Nested queries / Correlated subqueries

UNION combines the results of two queries and removes dupliSet operations

Indexes speed up query execution by allowing faster data loo Query optimization

MINUS returns rows from the first query that do not appear inSet operations

DISTINCT removes duplicate rows from query results. set operations/Queries

Correlated subqueries reference columns from the outer querNested queries / Correlated subqueries

JOIN is not a set operation; it combines columns from two tablSet operations

Indexes improve SELECT query performance by enabling fasterQuery optimization

INTERSECT returns rows present in both SELECT results. Set operations

SELECT DISTINCT removes duplicates from the query output. set operation
A nested query is a query embedded inside anset operation q Nested queries / Correlated subqueries

UNION combines the results of two queries and removes dupliset operation

Indexes speed up query execution by allowing faster data loo Query optimization

MINUS returns rows from the first query that do not appear inSet operations

DISTINCT removes duplicate rows from query results. set operation

Correlated subqueries reference columns from the outer querNested queries / Correlated subqueries

JOIN is not a set operation; it combines columns from two tablSet operations

Indexes improve SELECT query performance by enabling fasterQuery optimization

INTERSECT returns rows present in both SELECT results. set operation

SELECT DISTINCT removes duplicates from the query output. set operation
A nested query is a query embedded inside anset operation q Nested queries / Correlated subqueries

UNION combines the results of two queries and removes dupliset operation

Indexes speed up query execution by allowing faster data loo Query optimization

MINUS returns rows from the first query that do not appear inSet operations

DISTINCT removes duplicate rows from query results. set operation

Correlated subqueries reference columns from the outer querNested queries / Correlated subqueries

JOIN is not a set operation; it combines columns from two tablSet operations

Indexes improve SELECT query performance by enabling fasterQuery optimization

INTERSECT returns rows present in both SELECT results. set operation

SELECT DISTINCT removes duplicates from the query output. set operation
Correlated subqueries execute once per each row of the outerNested queries / Correlated subqueries

MINUS returns rows in the first query that do not appear in t Set operations

B-tree indexes are efficient for high-cardinality columns. Query optimization

Execution plans describe how the database engine executes aQuery optimization

CROSS JOIN returns the Cartesian product of two tables. Query optimization

Indexes speed up data retrieval but may slow down inserts. Query optimization

The query returns the symmetric difference using UNION and set operation

Indexes on join keys improve join performance. Query optimization

Correlated subqueries execute repeatedly and are slower. Nested queries / Correlated subqueries

Execution plans highlight bottlenecks in query processing. set operation


Correlated subqueries execute once per each row of the outerNested queries / Correlated subqueries

MINUS returns rows in the first query that do not appear in t Set operations

B-tree indexes are efficient for high-cardinality columns. Query optimization

Execution plans describe how the database engine executes aQuery optimization

CROSS JOIN returns the Cartesian product of two tables. Query optimization

Indexes speed up data retrieval but may slow down inserts. Query optimization

The query returns the symmetric difference using UNION and set operation

Indexes on join keys improve join performance. Query optimization

Correlated subqueries execute repeatedly and are slower. Nested queries / Correlated subqueries

Execution plans highlight bottlenecks in query processing. set operation


Correlated subqueries execute once per each row of the outerNested queries / Correlated subqueries

MINUS returns rows in the first query that do not appear in t Set operations

B-tree indexes are efficient for high-cardinality columns. Query optimization

Execution plans describe how the database engine executes aQuery optimization

CROSS JOIN returns the Cartesian product of two tables. Query optimization

Indexes speed up data retrieval but may slow down inserts. Query optimization

The query returns the symmetric difference using UNION and set operation

Indexes on join keys improve join performance. Query optimization

Correlated subqueries execute repeatedly and are slower. Nested queries / Correlated subqueries

Execution plans highlight bottlenecks in query processing. set operation


Correlated subqueries execute once per each row of the outerNested queries / Correlated subqueries

MINUS returns rows in the first query that do not appear in t Set operations

B-tree indexes are efficient for high-cardinality columns. Query optimization

Execution plans describe how the database engine executes aQuery optimization

CROSS JOIN returns the Cartesian product of two tables. Query optimization

Rewriting correlated subqueries as JOINs can drastically impr set operation

Indexes on join keys reduce the need for full table scans. Query optimization

Low selectivity or outdated statistics can cause the optimizer tQuery optimization

Cost-based optimization selects plans based on estimated res Query optimization

Bitmap indexes perform poorly with many distinct values. Query optimization
NULL handling can add overhead in correlated subqueries. Nested queries / Correlated subqueries

Updated statistics can cause the optimizer to choose differentQuery optimization

Join elimination removes redundant joins to improve performQuery optimization

Functions on indexed columns usually prevent index usage. Query optimization

Nested loops join performs well on small inputs; hash join scalQuery optimization

Rewriting correlated subqueries as JOINs can drastically impr set operation

Indexes on join keys reduce the need for full table scans. Query optimization

Low selectivity or outdated statistics can cause the optimizer tQuery optimization

Cost-based optimization selects plans based on estimated res Query optimization

Bitmap indexes perform poorly with many distinct values. Query optimization
NULL handling can add overhead in correlated subqueries. Nested queries / Correlated subqueries

Updated statistics can cause the optimizer to choose differentQuery optimization

Join elimination removes redundant joins to improve performQuery optimization

Functions on indexed columns usually prevent index usage. Query optimization

Nested loops join performs well on small inputs; hash join scalQuery optimization

Rewriting correlated subqueries as JOINs can drastically impr set operation

Indexes on join keys reduce the need for full table scans. Query optimization

Low selectivity or outdated statistics can cause the optimizer tQuery optimization

Cost-based optimization selects plans based on estimated res Query optimization

Bitmap indexes perform poorly with many distinct values. Query optimization

You might also like