When I perform Integrity Tests between DEV project and PROD project, there are some reports (not related to changes) that return different SQL statements. To be more precise, some reports on DEV project have additional WHERE statement comparing to the same reports on PROD.
Usually that additional 'WHERE' changes nothing because in most cases the results match the corresponding report. It is always the same pattern, generated SQL has WHERE statements in the script, but for DEV projects, there is another WHERE statement (usually at the end) that consists of the previous WHERE statements. It's like another 'check'.
I've spent some time reading documentation, MSTR tickets and trying to find the reason by myself. For sure it is not:
- VLDB properties --> Query Optimizations --> SQL Global Optimization (for all reports it is set to default)
- no wildcards used
- dynamic SQL option (to be chosen when setting Integrity Tests)
Perhaps somebody knows the reason?