
# Chapter 3: The Great Lunch Rush (Planning & Operations)
When you hand an incredibly complex request to Postgres, the engine does not immediately grab a shovel and start digging. That would be rash, and rashness leads to unnecessary physical exertion! It would be like trying to play croquet with a hedgehog before you've even found your mallet.
Instead, the engine hands your request up the kitchen hierarchy to the **Query Planner**—otherwise known as the **Lazy Head Chef**.
The Head Chef sits comfortably in his office, far away from the physical labor of scanning pages or building hash tables. His sole responsibility is to calculate the absolute cheapest, fastest, most effortless path to achieve your goal. He measures success in "Elephant Sweat"—the fewer drops spilled, the better the service plan!
But he doesn’t work alone. He has a team of specialized **[[Chapter 3/3.2.1 - The Pantry Fetchers (Scans)|Pantry Fetchers]]** (Operation Nodes) at his disposal, and he must decide which ones to send into the dining room. Will it be the **[[Chapter 3/3.2.1 - The Pantry Fetchers (Scans)#Index Scan: The Express Elevator|Express Fetchers]]** or the **[[Chapter 3/3.2.1 - The Pantry Fetchers (Scans)#Sequential Scan: Walking the Frozen Pantry|Slow Walking Servers]]**?
In this chapter, we will witness the Royal Trial of Efficiency:
1. **Planning**: How the Head Chef calculates the "Cost" of laziness using his magical ledger.
2. **Sargability**: How the way you phrase your request determines if the Head Chef can use his best shortcuts—or if he has to send everyone into the kitchen for a deep scrub.
3. **Operations**: The actual physical labor performed by the waiters once the plan is signed, sealed, and delivered.
---
[[Chapter 2/2.6 - The Cost of Fame|← 2.6 - The Cost of Fame]] | [[Learn You a Postgres for Great Good|↑ Learn You a Postgres for Great Good]] | [[Chapter 3/3.1 - The Head Chef's Menu|3.1 - The Head Chef's Menu →]]