SELECT sql_text, plan_table_output FROM ( SELECT st.sql_text, CASE WHEN INSTR(p.other_xml, ' 0 THEN 'Potential missing index suggested by the optimizer' ELSE 'No missing index suggestion found' END AS plan_table_output FROM dba_hist_sqlstat st JOIN dba_hist_sql_plan p ON st.sql_id = p.sql_id WHERE INSTR(p.other_xml, ' 0 -- Check for missing index suggestion AND st.executions_delta > 100 -- Filter for frequently executed statements ) WHERE ROWNUM <= 10; -- Limit the number of results to the top 10