Scaling Guide
Complexity
| Metric | Complexity |
|---|---|
| Point lookups | O(log n) |
| Constraint checks | O(log n) |
| Integrity scan | O(n) (chunked, bounded memory) |
At 10M rows (projected)
- Point lookups remain index-bound.
- Full graph scan ~10–12 minutes (linear).
- Memory < 5 MB (chunked processing).
Recommendations
- Indexing — Rely on the built-in
type_lookupindex; see Indexing. - Object cache — Enable Redis/Memcached for WordPress; relationship queries benefit from cached post/user/term data.
- Integrity scans — Run
wp content-relations checkduring low-traffic windows; use--fixonly when needed. - WP_Query — Use
content_relationwith a single relation type and reasonableposts_per_pageto avoid heavy JOINs.
See Benchmarks for measured latency and resource usage.