How partition pruning improved with MySQL 8?

In MySQL 8, partition pruning has been improved to make it more efficient and flexible. Partition pruning is a performance optimization technique that helps to minimize the amount of data that needs to be scanned during query execution. It involves the exclusion of unneeded partitions from the query execution plan, based on the conditions specified in the WHERE clause.

MySQL 8 introduced several new features that enhance partition pruning:

  1. Virtual Columns: Virtual columns can be used in partitioning expressions and indexes, allowing for improved partition pruning.
  2. Better Partition Pruning with System-Versioned Tables: System-versioned tables in MySQL 8 use a new versioning mechanism that makes it easier to implement time-based partitioning and to perform partition pruning.
  3. Improved Partitioning Key Ranges: In MySQL 8, it’s now possible to specify partitioning key ranges in a more flexible manner, which enables better partition pruning for certain types of queries.

These new features make it easier to take advantage of partition pruning and to improve query performance in MySQL 8.

About Shiv Iyer 157 Articles
Open Source Database Systems Engineer with a deep understanding of Optimizer Internals, Performance Engineering, Scalability and Data SRE. Shiv currently is the Founder, Investor, Board Member and CEO of multiple Database Systems Infrastructure Operations companies in the Transaction Processing Computing and ColumnStores ecosystem. He is also a frequent speaker in open source software conferences globally.