DB2 10 for z/OS Database Administrator — Question 7
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?
Answer options
- A. REORG TABLE sales AND INDEXES ALL; RUNSTATS ON TABLE sales AND INDEXES ALL;
- B. REORG TABLE sales INPLACE; REORG INDEXES ALL FOR TABLE sales; RUNSTATS ON TABLE sales AND INDEXES ALL;
- C. RUNSTATS ON TABLE sales AND INDEXES ALL; REORGCHK ON TABLE sales;
- D. RUNSTATS ON TABLE sales INPLACE AND INDEXES ALL;
Correct answer: A
Explanation
The correct answer is A because performing a REORG on the SALES table and its indexes will reduce fragmentation and improve query performance, followed by RUNSTATS to update statistics. Option B, while it reorganizes the table, uses INPLACE which might not be as effective as a full reorganization in this context. Options C and D do not include the necessary REORG operation to address fragmentation, making them less effective in improving performance.