IBM Data Management Community Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems. Join / Log in
- application development (new/change of application code)
- DBA review of application development change
- reactionary (performance problem in production or late phase testing)
The most common cause of optimizer poor choice is inaccurate estimation of filtering.
Sometimes, it's due to insufficient statistics
Sometimes due to inability to use available statistics (SALES_TIMESTAMP BETWEEN ? AND ? - is it 0001-01-01 through 9999-12-31? or is 1 minute range, 1 day, week, month...)Sometimes both.So the first thing we recommend is to ensure sufficient statistics are collected.I assume you'd be interested to a more advanced "deep analysis" of particular query and access path choice if that were available?