Xray
1h 6h 24h 48h 3d 5d 7d 14d 30d ‹
Last 1 hour▾
Ends now. Anything up to this cluster's 30-day retention.
Start and end times
Cancel
Interpreted in UTC (change it at the right of this bar). Earliest available: 2026-10-19 17:15:07.
› →|
updated 1d ago
Sample data. This database was generated by scripts/seed_dev_db.py — every service, deploy, person and figure on this page is synthetic. Names are sample.*@seed.invalid and image tags are prefixed SEED-. Nothing here happened.
← query trends

Query shape trend

plan A79F3DA6 · last 1h

Optimizer suggestions — proposals from claude-opus-5-5, 3d ago; suggests only, a human applies

index Composite range index on Document(status, archived)
The issue`MATCH (d:Document {status: $status, archived: true})` filters on status and archived. Neither is the node key (tildaid), and nothing suggests either one is indexed. Without an index the planner has to run NodeByLabelScan on every :Document and Filter each row before expanding DOC_TO_ORG. LIMIT only stops the scan early when matches are common. When a status value has few archived documents, the scan reads most of the label. That would explain the gap between the 383 ms average and the 5,750 ms p95.
The fixCreate a composite range index on both equality predicates. The planner can then use NodeIndexSeek on (status, archived) and touch only the matching documents before expanding to Organization. Both predicates are equalities, so a composite index fits exactly. Put status first, since it is probably the more selective of the two.
Add this index
CREATE INDEX document_status_archived IF NOT EXISTS FOR (d:Document) ON (d.status, d.archived)
Expected: The tail should drop the most. Slow calls for rare status values could go from seconds to tens of milliseconds, because the work would scale with the number of matching docs rather than all :Document nodes. Total savings are small because it only ran 17 times in 7 days (about 6.5 s total). The main gain is removing the multi-second worst case. · Evidence: Run EXPLAIN/PROFILE before and after with a status value from a slow call. Before, look for NodeByLabelScan(d:Document) + Filter with high db hits. After, look for NodeIndexSeek on document_status_archived. Check that SHOW INDEXES lists it ONLINE. Then compare p95 for shape A79F3DA6 over the next week.
index Fallback: single-property index on Document(status)
The issueComposite indexes only help when the query uses both properties. If other docsvc queries filter Document by status alone, they won't benefit from the composite index. Also, archived is a boolean with low selectivity, so it does almost nothing in the composite. The cost here is driven by status.
The fixIf PROFILE shows status alone narrows Document to a small set, a single-property index on status is enough. Seek on status, then filter archived = true in memory. That index can also serve other status-only queries. Create this only if the composite index isn't wanted or isn't picked, so you don't keep two indexes.
Add this index
CREATE INDEX document_status IF NOT EXISTS FOR (d:Document) ON (d.status)
Expected: Similar to the composite index if few documents share each status value. Less effective if most documents for a status are not archived, because those rows still get filtered after the seek. · Evidence: Count documents per status, and per status with archived = true, e.g. MATCH (d:Document) RETURN d.status, d.archived, count(*). PROFILE should show NodeIndexSeek on document_status, with Filter rows close to the LIMIT.

Status: proposed · all suggestions

No rollups for this shape in the window.