🗄️Zero-Copy Clone
Also known as Zero-Copy Cloning, Table Clone, Shallow Clone
A fast copy of a table. It shares its files until one side changes.
Think of it like
It is like a photocopy that only uses ink where you write on it. The rest still points at the first page.
Example
A team clones its 4 TB sales database each morning for testing. The clone is ready fast, and testers can change it without touching the real data.
Why it matters
Testing on real data used to mean slow, costly copies. A clone makes a safe test copy cheap.
Definition
Example code
sql
CREATE TABLE orders_test CLONE orders;Common mistake
Key takeaways
- 1Shares files. Nothing is copied at the start.
- 2Writes on change. New files only for changed rows.
- 3Fast. Ready in moments, even when huge.