1. What
Vertical splitting refers to splitting a field that originally belonged to a large table into fields of two or more tables, just like cutting a table vertically with a knife and dividing it into multiple tables.
二、Why
The purpose of vertical split is twofold:
- Reduce table capacity
- By reducing the line size, the memory can cache more lines, thereby increasing the cache hit rate, thereby improving query efficiency and speed.
Three, How
Steps to split vertically:
- The fields of the table are divided into two types, one type is a field with a small field length and frequently accessed, and the other is all others, including fields with a large length but frequently accessed and infrequently accessed.
- Create a separate main table for the first type of fields.
- Create one or more independent tables for other types of fields.
Four, Example
For example, the information displayed on the list page can be placed in a table, and some information in the detail page can be placed in an extended table.