← Back to team overview

maria-discuss team mailing list archive

Re: Are some MyISAM settings used for Aria


Le 24/04/2017 à 23:05, Sales a écrit :
On Apr 24, 2017, at 3:04 PM, jocelyn fournier <jocelyn.fournier@xxxxxxxxx <mailto:jocelyn.fournier@xxxxxxxxx>> 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:



"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 :

      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.


  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

  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.