1.在pl/sql中打开cmd命令容器 2.在cmd命令窗口中输入:explain plan for select * from t; 3.查看sql语句的执行计划:select * from table(dbms_xplan.display); MISSES IN library cache during parse:1 翻译:发生在解析的硬解析数量为1,表示硬解析 MISSES IN library cache during parse:0 翻译:发生在解析的硬解析数量为0,表示没有硬解析,…
今天碰到一个非常奇怪的问题问题,一条SQL语句在PL/SQL developer中很慢,需要9s,问题SQL: SELECT * FROM GG_function_location f WHERE f.parent_id ='03000000000001'; 表GG_function_location有5千万的数据,parent_id上是有索引的. 诊断第一步:就在PL/SQL developer中按F5,看到的执行计划是走索引的,应该不会慢啊. 第二步:在sqlplus中用autotrace…