<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/sql/multi_range_read.cc, branch 10.56-MDEV-30986</title>
<subtitle>github.com: MariaDB/server.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/'/>
<entry>
<title>Fix various spelling errors still found in code</title>
<updated>2021-03-22T07:10:39+00:00</updated>
<author>
<name>Otto Kekäläinen</name>
<email>otto@kekalainen.net</email>
</author>
<published>2020-12-20T19:07:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=cebf9ee2040195a61fbed32d06cc2e335e9f8dfd'/>
<id>cebf9ee2040195a61fbed32d06cc2e335e9f8dfd</id>
<content type='text'>
Reseting -&gt; Resetting
Unknow -&gt; Unknown
capabilites -&gt; capabilities
choosen -&gt; chosen
direcory -&gt; directory
informations -&gt; information
openned -&gt; opened
refered -&gt; referred
to access -&gt; one to access
missmatch -&gt; mismatch
succesfully -&gt; successfully
dont -&gt; don't
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reseting -&gt; Resetting
Unknow -&gt; Unknown
capabilites -&gt; capabilities
choosen -&gt; chosen
direcory -&gt; directory
informations -&gt; information
openned -&gt; opened
refered -&gt; referred
to access -&gt; one to access
missmatch -&gt; mismatch
succesfully -&gt; successfully
dont -&gt; don't
</pre>
</div>
</content>
</entry>
<entry>
<title>cleanup: ha_external_unlock() helper</title>
<updated>2020-05-05T17:41:12+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2020-04-19T17:47:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=67aaf51cf9ef95180702ca9ae6275631bb40e7c7'/>
<id>67aaf51cf9ef95180702ca9ae6275631bb40e7c7</id>
<content type='text'>
as mentioned in f9f33b85be6 and generally to make it
easier to talk about
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as mentioned in f9f33b85be6 and generally to make it
easier to talk about
</pre>
</div>
</content>
</entry>
<entry>
<title>cleanup: pk_is_clustering_key() -&gt; is_clustering_key()</title>
<updated>2020-03-31T15:42:33+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2020-03-24T21:22:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=dc3185c7597d0dd4a34aae2ade2b78404adbdf94'/>
<id>dc3185c7597d0dd4a34aae2ade2b78404adbdf94</id>
<content type='text'>
where PK is neither required nor implied
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
where PK is neither required nor implied
</pre>
</div>
</content>
</entry>
<entry>
<title>Updated optimizer costs in multi_range_read_info_const() and sql_select.cc</title>
<updated>2020-03-27T01:58:32+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2020-02-28T10:59:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=eb483c5181ab430877c135c16224284cfc517b3d'/>
<id>eb483c5181ab430877c135c16224284cfc517b3d</id>
<content type='text'>
- multi_range_read_info_const now uses the new records_in_range interface
- Added handler::avg_io_cost()
- Don't calculate avg_io_cost() in get_sweep_read_cost if avg_io_cost is
  not 1.0.  In this case we trust the avg_io_cost() from the handler.
- Changed test_quick_select to use TIME_FOR_COMPARE instead of
  TIME_FOR_COMPARE_IDX to align this with the rest of the code.
- Fixed bug when using test_if_cheaper_ordering where we didn't use
  keyread if index was changed
- Fixed a bug where we didn't use index only read when using order-by-index
- Added keyread_time() to HEAP.
  The default keyread_time() was optimized for blocks and not suitable for
  HEAP. The effect was the HEAP prefered table scans over ranges for btree
  indexes.
- Fixed get_sweep_read_cost() for HEAP tables
- Ensure that range and ref have same cost for simple ranges
  Added a small cost (MULTI_RANGE_READ_SETUP_COST) to ranges to ensure
  we favior ref for range for simple queries.
- Fixed that matching_candidates_in_table() uses same number of records
  as the rest of the optimizer
- Added avg_io_cost() to JT_EQ_REF cost. This helps calculate the cost for
  HEAP and temporary tables better. A few tests changed because of this.
- heap::read_time() and heap::keyread_time() adjusted to not add +1.
  This was to ensure that handler::keyread_time() doesn't give
  higher cost for heap tables than for normal tables. One effect of
  this is that heap and derived tables stored in heap will prefer
  key access as this is now regarded as cheap.
- Changed cost for index read in sql_select.cc to match
  multi_range_read_info_const(). All index cost calculation is now
  done trough one function.
- 'ref' will now use quick_cost for keys if it exists. This is done
  so that for '=' ranges, 'ref' is prefered over 'range'.
- scan_time() now takes avg_io_costs() into account
- get_delayed_table_estimates() uses block_size and avg_io_cost()
- Removed default argument to test_if_order_by_key(); simplifies code
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- multi_range_read_info_const now uses the new records_in_range interface
- Added handler::avg_io_cost()
- Don't calculate avg_io_cost() in get_sweep_read_cost if avg_io_cost is
  not 1.0.  In this case we trust the avg_io_cost() from the handler.
- Changed test_quick_select to use TIME_FOR_COMPARE instead of
  TIME_FOR_COMPARE_IDX to align this with the rest of the code.
- Fixed bug when using test_if_cheaper_ordering where we didn't use
  keyread if index was changed
- Fixed a bug where we didn't use index only read when using order-by-index
- Added keyread_time() to HEAP.
  The default keyread_time() was optimized for blocks and not suitable for
  HEAP. The effect was the HEAP prefered table scans over ranges for btree
  indexes.
- Fixed get_sweep_read_cost() for HEAP tables
- Ensure that range and ref have same cost for simple ranges
  Added a small cost (MULTI_RANGE_READ_SETUP_COST) to ranges to ensure
  we favior ref for range for simple queries.
- Fixed that matching_candidates_in_table() uses same number of records
  as the rest of the optimizer
- Added avg_io_cost() to JT_EQ_REF cost. This helps calculate the cost for
  HEAP and temporary tables better. A few tests changed because of this.
- heap::read_time() and heap::keyread_time() adjusted to not add +1.
  This was to ensure that handler::keyread_time() doesn't give
  higher cost for heap tables than for normal tables. One effect of
  this is that heap and derived tables stored in heap will prefer
  key access as this is now regarded as cheap.
- Changed cost for index read in sql_select.cc to match
  multi_range_read_info_const(). All index cost calculation is now
  done trough one function.
- 'ref' will now use quick_cost for keys if it exists. This is done
  so that for '=' ranges, 'ref' is prefered over 'range'.
- scan_time() now takes avg_io_costs() into account
- get_delayed_table_estimates() uses block_size and avg_io_cost()
- Removed default argument to test_if_order_by_key(); simplifies code
</pre>
</div>
</content>
</entry>
<entry>
<title>Added page_range to records_in_range() to improve range statistics</title>
<updated>2020-03-27T01:54:45+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2020-02-27T17:12:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=f36ca142f7fa59598e34e842b60372b963067766'/>
<id>f36ca142f7fa59598e34e842b60372b963067766</id>
<content type='text'>
Prototype change:
-  virtual ha_rows records_in_range(uint inx, key_range *min_key,
-                                   key_range *max_key)
+  virtual ha_rows records_in_range(uint inx, const key_range *min_key,
+                                   const key_range *max_key,
+                                   page_range *res)

The handler can ignore the page_range parameter. In the case the handler
updates the parameter, the optimizer can deduce the following:
- If previous range's last key is on the same block as next range's first
  key
- If the current key range is in one block
- We can also assume that the first and last block read are cached!
  This can be used for a better calculation of IO seeks when we
  estimate the cost of a range index scan.

The parameter is fully implemented for MyISAM, Aria and InnoDB.
A separate patch will update handler::multi_range_read_info_const() to
take the benefits of this change and also remove the double
records_in_range() calls that are not anymore needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prototype change:
-  virtual ha_rows records_in_range(uint inx, key_range *min_key,
-                                   key_range *max_key)
+  virtual ha_rows records_in_range(uint inx, const key_range *min_key,
+                                   const key_range *max_key,
+                                   page_range *res)

The handler can ignore the page_range parameter. In the case the handler
updates the parameter, the optimizer can deduce the following:
- If previous range's last key is on the same block as next range's first
  key
- If the current key range is in one block
- We can also assume that the first and last block read are cached!
  This can be used for a better calculation of IO seeks when we
  estimate the cost of a range index scan.

The parameter is fully implemented for MyISAM, Aria and InnoDB.
A separate patch will update handler::multi_range_read_info_const() to
take the benefits of this change and also remove the double
records_in_range() calls that are not anymore needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace handler::primary_key_is_clustered() with handler::pk_is_clustering_key()</title>
<updated>2020-03-24T19:00:04+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2020-02-26T12:52:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=37393bea23d10741cf99b59ddcaffd58e9652bb9'/>
<id>37393bea23d10741cf99b59ddcaffd58e9652bb9</id>
<content type='text'>
This was done to both simplify the code and also to be easier to handle
storage engines that are clustered on some other index than the primary
key.

As pk_is_clustering_key() and is_clustering_key now are using only
index_flags, these where removed from all storage engines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was done to both simplify the code and also to be easier to handle
storage engines that are clustered on some other index than the primary
key.

As pk_is_clustering_key() and is_clustering_key now are using only
index_flags, these where removed from all storage engines.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge 10.4 to 10.5</title>
<updated>2020-03-18T10:00:38+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2020-03-18T10:00:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=305cffebaba7a81fcc12f0c7511ffe639cb9b0d2'/>
<id>305cffebaba7a81fcc12f0c7511ffe639cb9b0d2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed double records_in_range calls from multi_range_read_info_const</title>
<updated>2020-03-17T00:16:48+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2020-03-13T13:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=1242eb3d32f2863f847aa96a10e2ab983a1a643b'/>
<id>1242eb3d32f2863f847aa96a10e2ab983a1a643b</id>
<content type='text'>
This was to remove a performance regression between 10.3 and 10.4
In 10.5 we will have a better implementation of records_in_range
that will enable us to get more statistics.
This change was not done in 10.4 because the 10.5 will be part of
a larger change that is not suitable for the GA 10.4 version

Other things:
- Changed default handler block_size to 8192 to fix things statistics
  for engines that doesn't set the block size.
- Fixed a bug in spider when using multiple part const ranges
  (Patch from Kentoku)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was to remove a performance regression between 10.3 and 10.4
In 10.5 we will have a better implementation of records_in_range
that will enable us to get more statistics.
This change was not done in 10.4 because the 10.5 will be part of
a larger change that is not suitable for the GA 10.4 version

Other things:
- Changed default handler block_size to 8192 to fix things statistics
  for engines that doesn't set the block size.
- Fixed a bug in spider when using multiple part const ranges
  (Patch from Kentoku)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix various spelling errors</title>
<updated>2020-03-15T22:10:50+00:00</updated>
<author>
<name>Otto Kekäläinen</name>
<email>otto@kekalainen.net</email>
</author>
<published>2020-03-04T16:30:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=c8388de2fd9d6132f5e74a2e7943a98fbdcf2c58'/>
<id>c8388de2fd9d6132f5e74a2e7943a98fbdcf2c58</id>
<content type='text'>
e.g.
- dont -&gt; don't
- occurence -&gt; occurrence
- succesfully -&gt; successfully
- easyly -&gt; easily

Also remove trailing space in selected files.

These changes span:
- server core
- Connect and Innobase storage engine code
- OQgraph, Sphinx and TokuDB storage engines

Related to MDEV-21769.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
e.g.
- dont -&gt; don't
- occurence -&gt; occurrence
- succesfully -&gt; successfully
- easyly -&gt; easily

Also remove trailing space in selected files.

These changes span:
- server core
- Connect and Innobase storage engine code
- OQgraph, Sphinx and TokuDB storage engines

Related to MDEV-21769.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-21610 Different query results from 10.4.11 to 10.4.12</title>
<updated>2020-02-20T10:35:19+00:00</updated>
<author>
<name>Sergei Petrunia</name>
<email>psergey@askmonty.org</email>
</author>
<published>2020-02-20T10:35:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=e637355156cb28388a291b0e3a5e9ee863b2854d'/>
<id>e637355156cb28388a291b0e3a5e9ee863b2854d</id>
<content type='text'>
Part#2: cleanup:

In the part 1 of the fix, DS-MRR implementation would peek into
the JOIN_TAB to get the rowid filter from

  table-&gt;reginfo.join_tab-&gt;rowid_filter

This doesn't look good from code isolation standpoint (why should a
storage engine assume it is used through a JOIN_TAB?).

Fixed this by storing the 'un-pushed' rowid_filter in the DsMrr_impl
structure. The filter survives across multi_range_read_init() calls.

It is discarded when somebody calls index_end() or rnd_end() and cleans
up the DsMrr_impl.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part#2: cleanup:

In the part 1 of the fix, DS-MRR implementation would peek into
the JOIN_TAB to get the rowid filter from

  table-&gt;reginfo.join_tab-&gt;rowid_filter

This doesn't look good from code isolation standpoint (why should a
storage engine assume it is used through a JOIN_TAB?).

Fixed this by storing the 'un-pushed' rowid_filter in the DsMrr_impl
structure. The filter survives across multi_range_read_init() calls.

It is discarded when somebody calls index_end() or rnd_end() and cleans
up the DsMrr_impl.
</pre>
</div>
</content>
</entry>
</feed>
