show parameter db_file NAME TYPE VALUE ..."/>
您好,登錄后才能下訂單哦!
一、環(huán)境
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>
三、小結(jié)
1、對于全表掃描來說多塊讀,增加每次讀取的塊數(shù),可以提高性能。
2、在OLTP的系統(tǒng)中建議此參數(shù)設(shè)置為8、16、32
3、在OLAP的系統(tǒng)中建議此參數(shù)設(shè)置為128最大值
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。