Re: [Maria-discuss] Are some MyISAM settings used for Aria
![](https://secure.gravatar.com/avatar/06fb7e7f8217ef0e572a8334567b7559.jpg?s=120&d=mm&r=g)
Hi Jocelyn,
The article you linked is quite old, so I wanted to check the source code to find if something changed.
I didn't investigate much but I searched in MariaDB's master branch via GitHub. The search strings were 'read_rnd_buffer_size' and 'read-rnd-buffer-size'. I found nothing except for some test files and the variable initialization at server startup.
I repeated the same searches in MySQL master branch, and again, I found only tests and initialization.
Can you explain this? The variable is unused now?
Federico
--------------------------------------------
Lun 24/4/17, jocelyn fournier
![](https://secure.gravatar.com/avatar/9444e6c4bbf35ad00c7ad475c9e9492d.jpg?s=120&d=mm&r=g)
On Apr 24, 2017, at 8:14 AM, Federico Razzoli
wrote: Hi Jocelyn,
The article you linked is quite old, so I wanted to check the source code to find if something changed. I didn't investigate much but I searched in MariaDB's master branch via GitHub. The search strings were 'read_rnd_buffer_size' and 'read-rnd-buffer-size'. I found nothing except for some test files and the variable initialization at server startup. I repeated the same searches in MySQL master branch, and again, I found only tests and initialization. Can you explain this? The variable is unused now?
One use of read_rnd_buffer_size was with mrr in MySQL. After the changeover to Mariadb, we missed that Mariadb uses mrr_buffer_size instead of read_rnd_buffer_size. You probably know that, but, just pointing out one place where it would have been removed from the code. Steve
![](https://secure.gravatar.com/avatar/69621bd5bbc67cbe67c67431cd0c9b64.jpg?s=120&d=mm&r=g)
Hi Federico! Le 24/04/2017 à 18:56, Sales a écrit :
On Apr 24, 2017, at 8:14 AM, Federico Razzoli
wrote: Hi Jocelyn,
The article you linked is quite old, so I wanted to check the source code to find if something changed. I didn't investigate much but I searched in MariaDB's master branch via GitHub. The search strings were 'read_rnd_buffer_size' and 'read-rnd-buffer-size'. I found nothing except for some test files and the variable initialization at server startup. I repeated the same searches in MySQL master branch, and again, I found only tests and initialization. Can you explain this? The variable is unused now? 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.
Jocelyn
![](https://secure.gravatar.com/avatar/9444e6c4bbf35ad00c7ad475c9e9492d.jpg?s=120&d=mm&r=g)
On Apr 24, 2017, at 3:04 PM, jocelyn fournier
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: https://mariadb.com/kb/en/mariadb/multi-range-read-optimization/ https://mariadb.com/kb/en/mariadb/multi-range-read-optimization/ 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. Steve
![](https://secure.gravatar.com/avatar/69621bd5bbc67cbe67c67431cd0c9b64.jpg?s=120&d=mm&r=g)
Le 24/04/2017 à 23:05, Sales a écrit :
On Apr 24, 2017, at 3:04 PM, jocelyn fournier
mailto:jocelyn.fournier@gmail.com> wrote: You should search read_rnd_buff_size, it's used in sql/records.cc http://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:
https://mariadb.com/kb/en/mariadb/multi-range-read-optimization/
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. Yes it's not anymore mrr specific. The doc from the MariaDB source code is great to understand what it does :
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/bb2c1a52c61706dde8c525a8887... Jocelyn
participants (3)
-
Federico Razzoli
-
jocelyn fournier
-
Sales