February 2018
Intermediate to advanced
510 pages
16h 10m
English
A descending index is an index which stores key values in descending order. This index is scanned in the forward order, which gives better performance compared to other indexes. Descending indexes allow a user to define multi-column indexes in a combination of ascending and descending orders. Practical knowledge is always easier to understand than theoretical knowledge, right? So, let's take a look at some examples to understand the descending index in detail. First, create a table with the following definition:
CREATE TABLE t1 ( a INT, b INT, INDEX idx1 (a ASC, b ASC), INDEX idx2 (a ASC, b DESC), INDEX idx3 (a DESC, b ASC), INDEX idx4 (a DESC, b DESC));
As per the table definition, MySQL 8 will create four different indexes, ...
Read now
Unlock full access