Understanding advanced query optimization in PostgreSQL is crucial for achieving high-performance database management. This set of 30 MCQs focuses on execution plans, joins, subqueries, index optimization, and parallel query techniques.
EXPLAIN ANALYZE command do in PostgreSQL?
EXPLAIN ANALYZE?
Total runtime value represent in the output of EXPLAIN ANALYZE?
EXPLAIN ANALYZE output?
EXPLAIN ANALYZE?
EXPLAIN ANALYZE?
Cost field in the EXPLAIN ANALYZE output?
Seq Scan indicate in a query plan?
EXPLAIN ANALYZE shows a sequential scan on a large table?
IN operatorWITH clause (CTE) in a query?
Index Nested Loop join imply in a query plan?
EXISTS instead of INJOIN operation?
VACUUM ANALYZE do in PostgreSQL?
Bitmap Index Scan?
max_parallel_workers_per_gather parameterPARALLEL keyword in queriesParallel Seq Scan operation in a query plan?
| Qno | Answer (Option with text) |
|---|---|
| 1 | b) Displays the execution plan along with actual runtime statistics |
| 2 | d) All of the above |
| 3 | b) The overall time taken to execute the query |
| 4 | b) It includes both the planned and actual execution times |
| 5 | d) All of the above |
| 6 | d) All of the above |
| 7 | d) The estimated cost of executing a step in the query plan |
| 8 | a) A full table scan |
| 9 | a) INNER JOIN |
| 10 | a) Use an index on the relevant column |
| 11 | d) Both a and b |
| 12 | c) Subqueries with a high number of rows |
| 13 | a) By turning them into joins |
| 14 | d) All of the above |
| 15 | b) LEFT JOIN |
| 16 | b) A join operation that uses an index to speed up the process |
| 17 | d) All of the above |
| 18 | b) To improve query performance by reducing I/O |
| 19 | b) Hash index |
| 20 | b) They are only useful for queries that involve all indexed columns |
| 21 | d) Both a and c |
| 22 | c) Reclaims disk space and updates statistics for the planner |
| 23 | a) A type of index scan used for filtering large datasets |
| 24 | b) GIN index |
| 25 | a) A query that executes using multiple CPU cores simultaneously |
| 26 | d) All of the above |
| 27 | a) By setting the max_parallel_workers_per_gather parameter |
| 28 | a) It splits the sequential scan across multiple CPU cores |
| 29 | d) All of the above |
| 30 | d) All of the above |