DB2 optimizer is used to select the access paths and for processing SQL statements.
In IBM DB2, the component responsible for processing SQL statements and selecting access paths is the “Query Compiler” or “SQL Compiler.” The Query Compiler is responsible for analyzing SQL statements and determining the most efficient way to retrieve or manipulate data, including selecting the appropriate access paths and optimization techniques for executing the query.