When big data is stored in MySQL, it is recommended to make partitions of the data so that it can be easily retrieved whenever it's needed. This is because it will take too much time to execute queries for the unpartitioned data. Partitioning can be useful to execute queries on the selected partitions only instead of the whole table's data. It is always faster to execute queries on some chunks of data instead of the whole bulk. There are two ways to execute queries to make this faster using partitioning:
- Partition pruning: As we have seen in the previous topic, pruning can be used to retrieve data from specific partitions only. This pruning work automatically determines the partition in which it needs to query data from.
- Providing partition selections with the query: We can provide the partition name explicitly, along with the query being executed only on that particular partition. This way, partition selection can be specified within the queries. The following...