Partitioning:?
Short answer: Partitioning is the process of dividing a single table into smaller, more manageable pieces (partitions). This can be done either horizontally or vertically. Horizontal Partitioning: Data is divided based on rows (e.g., splitting a sales table by date range). Vertical Partitioning: Data is divided based on columns (e.g., splitting a user table into two: one for personal information and the other for preferences).
Example code
A sales table might be partitioned by year (2019, 2020, etc.), where each partition is stored in a different location or server.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png