Database design-vertical split

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:

  1. Reduce table capacity
  2. 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:

  1. 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.
  2. Create a separate main table for the first type of fields.
  3. 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.

Guess you like

Origin blog.csdn.net/hudmhacker/article/details/108258294