zoukankan      html  css  js  c++  java
  • [bbk4949]第64集 第7章 数据库的维护 01

    Oracle Optimizer:Overview

    The Oracle optimizer determines the most efficient execution plan and is the most important step in the processing of any SQL statement.

    The Optimizer

    • Evaluates expressions and conditions
    • Uses object and system statistics
    • Decides how to access the data
    • Decides how to join tables
    • Determines the most efficient path

    Optimizer Statistics

    Optimizer statistics are:

    • A snapshot at a point in time
    • Persistent across instance restarts
    • Collected automatically
    SQL> select count(*) from frx_oa_dict;
    
      COUNT(*)
    ----------
           480
    
    SQL> select num_rows from dba_tables
      2  where owner='ARCER' and table_name = 'FRX_OA_DICT';
    
      NUM_ROWS
    ----------
           479

    上述SQL语句说明,优化器的统计数据与实际表中的数据,有可能存在差距的.而oracle判断执行计划的依据则是数据字典中的统计数据.

    每个语句就是一个游标.

    Using the Manage Optimizer Statistics Page

    Gathering Optimizer Statistics Manually

    Preferences(首选项) for Gathering Statistics

  • 相关阅读:
    第十二周作业
    第十一周作业
    第十周作业
    第九周作业
    第八周作业
    bzoj3561DZY Loves Math VI
    bzoj3529[Sdoi2014]数表
    bzoj3309DZY Loves Math
    bzoj2823[AHOI2012]信号塔
    bzoj2301[HAOI2011]Problem b
  • 原文地址:https://www.cnblogs.com/arcer/p/3108016.html
Copyright © 2011-2022 走看看