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:02.
› →|
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 1C2D4153 · last 1h

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

none The timings come from EXPLAIN (planning only), not from running the query
The issueThis statement starts with EXPLAIN, so Neo4j only plans it and never runs the MATCH. The 3.6 s average and 17.5 s p95 therefore can't be the cost of scanning ProtocolVersionV2 or Study. They are most likely planning time, a plan-cache miss after a schema change, waiting for a lock or the transaction, or the client/tool's own round-trip. It ran 5 times in 7 days, which looks like someone checking plans by hand from a tool, not application traffic. No index would help either, because the pattern has no property filter to look up.
The fixDo not add indexes because of this shape. Find out where the time goes: run the same EXPLAIN in cypher-shell and compare its reported planning time with the 17.5 s figure. Also check query.log for the planning and waiting columns (db.logs.query.time_logging_enabled=true) on the slow runs. If planning really is slow, look at plan-cache churn (db.query_cache_size, how often the schema changes) and at GC pauses around those timestamps.
Expected: Probably no change to the workload, since 18 s in total over a week from an ad hoc tool is negligible. The value is in fixing the wrong idea that this MATCH is slow when it was never run. · Evidence: For the slow runs, query.log entries showing planning time compared with waiting time, plus the client application name for this shape. If planning is under 100 ms, the latency is outside the query engine.
rewrite If the real query is run (PROFILE or without EXPLAIN), give the relationship a type and direction, return only needed fields, and page the results
The issueIn `MATCH (p:ProtocolVersionV2)--(s:Study)`, the relationship has no type and no direction. The planner has to scan one label, follow every relationship of every node in either direction, and then check the label on the far end. On densely connected nodes that is a lot of wasted work. `RETURN p,s` also sends back every property of both nodes for the whole cross-product, and with no LIMIT the full result is built and sent at once.
The fixUse the real relationship type and direction from the data model (REL_TYPE below is a placeholder you need to replace). Then the expansion only follows that one relationship type, and Neo4j can use the per-type counts it keeps on dense nodes. Return only the properties you need instead of whole nodes, and add SKIP/LIMIT for paging if the caller doesn't need everything at once. If `p.id` and `s.id` don't exist, use the real key properties.
Proposed rewrite
MATCH (p:ProtocolVersionV2)-[:REL_TYPE]->(s:Study)
RETURN p.id AS protocolVersionId, s.id AS studyId
SKIP $skip LIMIT $limit
Expected: Fewer database hits on the Expand(All) step, roughly in proportion to how many of each node's relationships are of other types. Much less data sent over the wire. The size of the effect depends on how many relationships each node has and how many rows match, so it could be negligible or large. · Evidence: PROFILE both versions and compare total db hits and rows on the Expand(All)/Filter steps. Also confirm the relationship type and direction with `MATCH (:ProtocolVersionV2)-[r]-(:Study) RETURN type(r), count(*)` before you rely on it.

Status: proposed · all suggestions

No rollups for this shape in the window.