您好,登錄后才能下訂單哦!
一、環境
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最大值
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。