Skip to Main Content
MySQL 8 Administrator???s Guide
book

MySQL 8 Administrator???s Guide

by Chintan Mehta, Hetal Oza, Subhash Shah, Ravi Shah
February 2018
Intermediate to advanced content levelIntermediate to advanced
510 pages
16h 10m
English
Packt Publishing
Content preview from MySQL 8 Administrator???s Guide

Partition pruning

Partition pruning is related to the optimization concept in partition. In partition pruning the concept described as Do not scan partitions where no possible matching values can be present is applied based on the query statements.

Suppose there is a partitioned table, tp1, created with the following statement:

CREATE TABLE tp1 (    first_name VARCHAR (30) NOT NULL,    last_name VARCHAR (30) NOT NULL,    zone_code TINYINT UNSIGNED NOT NULL,    doj DATE NOT NULL)PARTITION BY RANGE (zone_code) (    PARTITION p0 VALUES LESS THAN (65),    PARTITION p1 VALUES LESS THAN (129),    PARTITION p2 VALUES LESS THAN (193),    PARTITION p3 VALUES LESS THAN MAXVALUE);

In the preceding example table tp1, suppose you want to retrieve a result from the following ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On MySQL Administration

Hands-On MySQL Administration

Arunjith Aravindan, Jeyaram Ayyalusamy
SQL Cookbook, 2nd Edition

SQL Cookbook, 2nd Edition

Anthony Molinaro, Robert de Graaf

Publisher Resources

ISBN: 9781788395199Supplemental Content