Overview
Indexes and Constraints
Range, point, text indexes + UNIQUE / EXISTS constraints — your single biggest perf lever.
Why it matters
Without an index, the first MATCH in a query scans every node of the given label — fine for 10k nodes, catastrophic at 10M.
Going deeper
What each index type buys you and when to reach for it:
| Index type | Best for | Don't use for |
|---|---|---|
| Range (BTREE default) | =, <, >, range scans on most types | Substring searches |
| Text | STARTS WITH, CONTAINS, ENDS WITH | Numeric ranges |
| Point | Geospatial distance and bounding-box | Non-geospatial properties |
| Token-lookup | MATCH (n:Label) with no property filter | Anything requiring property predicates |
| Composite | Queries that filter on N properties together | Single-property predicates (the composite isn't used) |
A constraint also creates the matching index for free, so for any field you want unique you should prefer the constraint form over a bare CREATE INDEX.