Yes it's not anymore mrr specific.On Apr 24, 2017, at 3:04 PM, jocelyn fournier <jocelyn.fournier@gmail.com> wrote:
You should search read_rnd_buff_size, it's used in sql/records.cc to compute the size of the cache_records in the READ_RECORD struct.
But, the original link implied use with mrr, however, this page:
Says:
"MariaDB uses mrr_buffer_size as a limit of MRR buffer size for range access, while MySQL uses read_rnd_buffer_size.”
So, I guess it is still used, but, not for mrr.
rr_from_cache: -------------- This is a special variant of rr_from_tempfile that can be used for handlers that is not using the HA_FAST_KEY_READ table flag. Instead of reading the references one by one from the temporary file it reads a set of them, sorts them and reads all of them into a buffer which is then used for a number of subsequent calls to rr_from_cache. It is only used for SELECT queries and a number of other conditions on table size. and init_read_record is used to scan by using a number of different methods. Which method to use is set-up in this call so that later calls to the info->read_record will call the appropriate method using a function pointer. There are five methods that relate completely to the sort function filesort. The result of a filesort is retrieved using read_record calls. The other two methods are used for normal table access. The filesort will produce references to the records sorted, these references can be stored in memory or in a temporary file. The temporary file is normally used when the references doesn't fit into a properly sized memory buffer. For most small queries the references are stored in the memory buffer. https://raw.githubusercontent.com/MariaDB/server/bb2c1a52c61706dde8c525a8887f2d364c0db1eb/sql/records.cc Jocelyn