※This sample exam is different from those that appear in the actual OSS-DB Exam.
2019/03/04
ANALYZE aggregates statistical information about the contents of a table. The result is used by the query planner to create an optimal execution plan.
Since ANALYZE requires only table read locks, it can be executed in parallel with other tasks on the table.
In a huge table, random sampling is done rather than analyzing all of the data. Therefore, ANALYZE can be done in a short time even on very large tables.
ANALYZE can be executed by executing the ANALYZE command or by specifying the ANALYZE option in the VACUUM command. All tables in the database are targeted unless you add options. You can also optionally specify a specific table or a specific column of a table by specifying the table name, or the table name and column name.
Since the result of ANALYZE has a big influence on the performance of a query, when there is a big change in the contents of the table, for example, when loading or updating a large amount of data, it is desirable to execute ANALYZE each time.
In addition, it is common to perform regularly at times when databases are not used much, such as nightly once a day. Of course, on a table with no updates, if you only run ANALYZE once, you do not need to do it after that.
Therefore, the correct answers are C and E