It records execution time spent for SQL statements that exceed a specified threshold.
It identifies transactions and target tables currently waiting for locks.
It records execution statistics for all executed SQL statements.
It displays overall database statistics, with one row per database.
It displays table access statistics, with one row per table in the current database.
※This sample exam is different from those that appear in the actual OSS-DB Exam.
2025/05/29
The correct answer is "C. It records execution statistics for all executed SQL statements."
pg_stat_statements is a module that records execution statistics for all executed SQL statements. It can be used to analyze slow queries by checking the number of executions and the cumulative processing time of SQL statements.
Each option is explained below.
A. It records execution time spent for SQL statements that exceed a specified threshold.
Incorrect.
The above is an explanation of log_min_duration_statement.
B. It identifies transactions and target tables currently waiting for locks.
Incorrect.
The above is an explanation of pg_locks.
C. It records execution statistics for all executed SQL statements.
Correct.
D. It displays overall database statistics, with one row per database.
Incorrect.
The above is an explanation of pg_stat_database.
E. It displays table access statistics, with one row per table in the current database.
Incorrect.
The above is an explanation of pg_stat_all_tables.