最近看书看到执行计划,觉得自己的概念弄得比较混乱,有几个东西请大侠们帮忙解释下1、计划好像有解释计划和执行计划之分,这两个分别是根据什么产生的?比如CBO产生出的是哪个?是根据哪个表里的统计信息产生的?2、sql执行时到底是按解释计划执行,还是按执行计划执行?3、gather_plan_statitics和v$sql_plan_statistics_all是怎么个东西?

解决方案 »

  1.   

    http://www.2cto.com/database/201211/165081.html  说的已经很清楚了..
      

  2.   

    这不就是pro Oracle sql 原文吗?我就是看这个没看明白啊。。
    gather_plan_statistics是干什么用的啊?
      

  3.   

    我主要迷糊的是dbms_xplan.display_cursor不就是从library cache中获取的实际执行计划吗?
    为什么还要gather_plan_statistisc一下呢?