下面是在awr报告里面看到的有问题的sql,是9个变量的,在应用前台属于关联查询,在sqlplus里面手工执行检查实际执行情况如下: SELECT /*+ GATHER_PLAN_STATISTICS */ * FROM SAMS_CHECKINOUT sc INNER JOIN ( SELECT badgenumber,NAME,deptid FROM SAMS_USERINFO UNION SELECT badgenumber ,NAME ,deptid FROM SAMS_USERINFO…