MySQL 的 read_buffer_size 參數是如何影響寫緩沖和寫性能的?


Each thread // that does a sequential scan for a MyISAM table// allocates a buffer of this size (in bytes) for each table it scans. 

If you do many sequential scans, you might want to increase this value, which defaults to 131072. The value of this variable should be a multiple of 4KB. If

it is set to a value that is not a multiple of 4KB, its value will be rounded down to the nearest multiple of 4KB. This option is also used in the following context for all storage engines: For caching the indexes in a temporary file (not a temporary table), when sorting rows for ORDER BY.
用於緩存臨時表索引---order by For bulk insert into partitions.
批量插入到分區 For caching results of nested queries.
嵌套查詢的結果集

read_buffer_size 設置以順序掃描的方式掃描表數據的時候使用緩沖區的大小.
每個線程進行順序掃描的時候都會產生該buffer ,而且同一個Query中如果有多個表進行全表掃描,會產生多個該buffer.

 

 How read_buffer_size Impacts Write Buffering and Write Performance


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM