Junior — Middle
Can you explain what is meant by vertical data partitioning?
sobes.tech AI
Answer from AI
Vertical partitioning of data is a method of dividing a database table into multiple parts based on columns (attributes), rather than rows.
For example, if a table has many columns and some are used infrequently or for different purposes, frequently used columns can be separated into one table, and the rest into another. This allows:
- Reducing the amount of data to read during queries that only involve some columns.
- Improving performance through more efficient use of cache and reduced IO.
Example: there is a Users table with columns id, name, email, profile_picture, settings. Vertical partitioning can be done so that id, name, email are in one table, and profile_picture, settings are in another, especially if the latter are used infrequently.