DB2 EXPLAIN is one of the most useful tools for understanding how Db2 chooses to run a query. It shows…