Exam C2090-600 All QuestionsBrowse all questions from this exam
Question 17

A DBA has observed that queries executed against SALES table have poor performance. DB2 tools have indicated that the level of data fragmentation in the

SALES table is very high. Similar results were detected for indexes defined on the SALES table.

Which of the following commands should be used by the DBA to improve the performance of the queries run against the SALES table?

    Correct Answer: B

    To improve the performance of queries against a highly fragmented table and its indexes in DB2, the DBA should use the REORG command to reorganize both the table and its indexes. The command 'REORG TABLE sales INPLACE; REORG INDEXES ALL FOR TABLE sales; RUNSTATS ON TABLE sales AND INDEXES ALL;' will reorganize the table and indexes to reduce fragmentation and then update the statistics with RUNSTATS. This ensures optimized query performance by allowing the DB2 optimizer to make better decisions based on current data statistics.

Discussion
db2testerOption: B

The answer A is wrong. Indeed, the commands "REORG TABLE sales AND INDEXES ALL" and "RUNSTATS ON TABLE sales AND INDEXES ALL;" are syntactically wrong. The correct answer is B.

JamesBondOption: B

B is correct