The Author, Craig Mullen, presented great ideas on improving performance with DB2 SQL. Read DB2 questions, if you miss it.
Recommended reading
DB2 Performance tips
Here are the prime tips to know helpful for improving DB2 performance.
- Always use query with where clause.
- Always create indexes on table.
- Explicit join is performance worth than Inner join.
- Always put exact columns that you want to retrieve in SELECT statement, not more than that.
- Use FETCH FIRST n ROWS ONLY. Take an example FETCH FIRST 1 ROWS ONLY, after returns 1 row, you will receive SQL CODE= +100.
- Use OPTIMIZE FOR n ROWS.
- For read only cursors always use FOR READ ONLY
Related items
Related