温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

DB_FILE_MULTIBLOCK_READ_COUNT 与性能有关的参数

发布时间:2020-07-17 12:34:06 来源:网络 阅读:724 作者:roidba 栏目:关系型数据库

一、环境
Oracle 11g RAC

二、测试过程

SQL> show parameter db_file

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_multiblock_read_count        integer     128
db_file_name_convert                 string      /oracle/oradata/, +DATADG
db_files                             integer     200

SQL> set timing on
SQL> select count(*) from tt;

  COUNT(*)
----------
   5524288

Elapsed: 00:00:11.50
SQL> alter system flush buffer_cache;

System altered.

Elapsed: 00:00:00.20
SQL> alter system flush shared_pool;

System altered.

Elapsed: 00:00:00.39
SQL> alter session set db_file_multiblock_read_count=16;

Session altered.

Elapsed: 00:00:00.00
SQL> select count(*) from tt;

  COUNT(*)
----------
   5524288

Elapsed: 00:00:08.91
SQL> alter system flush buffer_cache; 

System altered.

Elapsed: 00:00:00.12

SQL> alter system flush shared_pool;

System altered.

Elapsed: 00:00:00.06
SQL> alter session set db_file_multiblock_read_count=32;

Session altered.

Elapsed: 00:00:00.00
SQL> select count(*) from tt;

  COUNT(*)
----------
   5524288

Elapsed: 00:00:07.87
SQL> alter system flush buffer_cache; 

System altered.

Elapsed: 00:00:00.14
SQL> alter system flush shared_pool;

System altered.

Elapsed: 00:00:00.06
SQL> alter session set db_file_multiblock_read_count=64;

Session altered.

Elapsed: 00:00:00.00
SQL> select count(*) from tt;

  COUNT(*)
----------
   5524288

Elapsed: 00:00:07.05
SQL> alter system flush buffer_cache;

System altered.

Elapsed: 00:00:00.15
SQL> alter system flush shared_pool;

System altered.

Elapsed: 00:00:00.06
SQL> alter session set db_file_multiblock_read_count=128;

Session altered.

Elapsed: 00:00:00.00
SQL> select count(*) from tt;

  COUNT(*)
----------
   5524288

Elapsed: 00:00:06.62
SQL> 
SQL> 

三、小结
1、对于全表扫描来说多块读,增加每次读取的块数,可以提高性能。
2、在OLTP的系统中建议此参数设置为8、16、32
3、在OLAP的系统中建议此参数设置为128最大值

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI