Rowid Filtering Optimization

You are viewing an old version of this article. View the current version here.

Rowid filtering is an optimization in MariaDB 10.4. Its target use case is as follows:

  • a table uses ref access on index IDX1
  • but it also has a fairly restrictive range predicate on another index IDX2.

In this case, it is advantageous to:

  • Do an index-only scan on index IDX2 and collect rowids of index records into a data structure that allows filtering (let's call it $FILTER).
  • When doing ref access on IDX1, check $FILTER before reading the full record

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.