Overview
Label Design
Picking labels that match query patterns — and the cost of over-labelling.
Why it matters
Labels are the planner's primary handle: indexes are scoped to a label, and MATCH (n:Label) is the entry point for almost every read.
Going deeper
Three working rules for label design:
- One primary label per node, naming what the node is (
:Person,:Company,:Order). This is the label yourMATCH (n:Label)queries start from and the label your indexes are scoped to. - Use additional labels sparingly, only for cross-cutting roles you query on directly (
:Active,:VIP,:Deleted). A label that's never used as the entry of a MATCH is paying its planner cost for nothing. - Prefer a property over a label for high-cardinality state —
(p:Person {status: 'archived'})instead of:Person:Archived, unless you always query archived people separately and want a dedicated index.
Anti-pattern: turning every domain attribute into a label (:Person:Engineer::Senior:Remote:EU). You've reinvented dimension tables — badly.