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:16:22.
› →|
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 A9FBACF4 · last 1h

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

rewrite Stop the undirected pattern from returning every pair twice
The issue`(pv:ProtocolVersionV2)--(pv1:ProtocolVersionV2)` has no direction and no relationship type. The planner has to scan every ProtocolVersionV2 node by label, expand all of its relationships of any type in both directions, and then check the label on the far node. Every connected pair comes back twice, once as (a,b) and once as (b,a), so the expand and the rows shipped to the client are about double what is needed. No property is filtered, so no index can help here. The cost comes from the shape of the pattern.
The fixReturn each pair once by keeping only one side of the mirrored result. The rewrite below uses `elementId(pv) < elementId(pv1)`, which doesn't need any knowledge of the schema. If the relationship between versions has a known direction and type (for example `-[:SUPERSEDES]->`), it is better to write that in the pattern, e.g. `(pv:ProtocolVersionV2)-[:TYPE]->(pv1:ProtocolVersionV2)` with no WHERE. Expand(Into/All) can then follow only one relationship type in one direction instead of every relationship on the node. That matters most if ProtocolVersionV2 nodes are also linked to many other kinds of node.
Proposed rewrite
MATCH (pv:ProtocolVersionV2)--(pv1:ProtocolVersionV2) 
WHERE elementId(pv) < elementId(pv1) 
RETURN pv, pv1
Expected: Should cut output rows by about half. If a typed, directed pattern is used, the expand should also get noticeably cheaper when these nodes have many unrelated relationships. How much it helps depends on how many relationships each node has. · Evidence: PROFILE the original and the rewrite on cluster delta and compare rows and db hits on the Expand and Filter operators. Check that the result count is about half the original. Also check the degree distribution, e.g. `MATCH (p:ProtocolVersionV2) RETURN avg(COUNT { (p)--() })`.
none This is an EXPLAIN, so the timings show planning, not execution
The issueThe statement starts with `EXPLAIN`, so Neo4j only plans it and does not run it. With 4 runs in 7 days it looks like someone checking the plan by hand. An 18 s p95 for planning alone is unusual. It points to waiting (for locks, a busy planner or a cold query cache) or to how the client measures time, not to the cost of running the query. No index or rewrite will fix time spent waiting outside the query.
The fixTreat this shape as a diagnostic, not production load. Only 14 s in total over a week, so it's low priority. If the 18 s outlier matters, look at what else was running on delta at that time (GC pauses, a large write transaction, plan cache evictions). Don't tune the query for that number.
Expected: Probably nothing to gain from changing the query itself. The total cost over a week is small. · Evidence: Check query.log or SHOW TRANSACTIONS around the slow run for planning time and pageCacheFaults vs. waitTime. Also check GC logs for a pause at the same time.

Status: proposed · all suggestions

No rollups for this shape in the window.