Similar to the preceding example that showed which SQL applications were implemented with table scans, the following example shows all queries that are implemented with table scans.
SELECT A.System_Table_Schema, A.System_Table_Name, A.Table_Total_Rows, A.Index_Advised, B.Open_Id, B.Open_Time, C.Clock_Time_to_Return_All_Rows, C.Number_Rows_Returned, D.Result_Rows, (D.End_Timestamp - D.Start_Timestamp) AS TOT_TIME, D.Statement_Text_Long FROM LIB/QQQ3000 A INNER JOIN LIB/QQQ3014 B ON (A.Join_Column = B.Join_Column AND A.Unique_Count = B.Unique_Count) LEFT OUTER JOIN LIB/QQQ3019 C ON (A.Join_Column = C.Join_Column AND A.Unique_Count = C.Unique_Count) LEFT OUTER JOIN LIB/QQQ1000 D ON (A.Join_Column = D.Join_Column AND A.Unique_Count = D.Unique_Count)
If the SQL statement text is not needed, joining to table QQQ1000 is not necessary. You can determine the total time and rows selected from data in the QQQ3014 and QQQ3019 rows.