I have a query with combination of multiple tables. For example: query contains 7 or 8 tables. My query is not fetching any records.
Is it possible to find out in which table the record is not present using Explain Plan or SQL Trace in Db2?
I have a query with combination of multiple tables. For example: query contains 7 or 8 tables. My query is not fetching any records.
Is it possible to find out in which table the record is not present using Explain Plan or SQL Trace in Db2?
In SQL Server the actual execution plans contains the actual number of rows. See Displaying Graphical Execution Plans. Also the arrows between operators contain the number of rows exchanged by the two operators involved. A knowledgeable expert can properly interpret the information in the execution plan to understand which join(s) is(are) suppressing the output.
For non-expert users is usually much easier to just look at the individual tables and figure out why the join has 0 rows.