{"id":"08f50a68-e467-4ffb-8519-df132079535f","task":"Query Amazon Neptune with both openCypher and Gremlin endpoints and use EXPLAIN to diagnose slow graph traversals","domain":"docs.aws.amazon.com/neptune/latest/userguide","steps":["Neptune exposes separate query endpoints: POST https://<cluster>:8182/openCypher for openCypher and POST https://<cluster>:8182/gremlin for Gremlin; both operate on the same property graph","Submit an openCypher query via the HTTP API: POST /openCypher with body {'query': 'MATCH (p:Person)-[:KNOWS]->(f:Person) WHERE p.name = $name RETURN f.name', 'parameters': {'name': 'Alice'}}","Submit a Gremlin query: POST /gremlin with body {'gremlin': 'g.V().has(\"Person\",\"name\",\"Alice\").out(\"KNOWS\").values(\"name\")'}","Use Neptune's EXPLAIN endpoint to retrieve the query plan for openCypher: GET /openCypher/explain?query=<url-encoded-query> — examine the plan for full graph scans vs index lookups","Create property indexes to avoid full vertex scans: Neptune uses an index on all vertex/edge property values by default (SPO/OSP index structure); ensure filter predicates match indexed properties","Monitor slow queries in CloudWatch Logs by enabling Neptune audit and query logs; filter for queries exceeding a latency threshold"],"gotchas":["Neptune does not support user-defined indexes like traditional graph databases; it relies on its built-in SPO/OSP/SOP index structures — query performance depends on predicate selectivity, not explicit index creation","openCypher and Gremlin cannot be mixed in a single request; if your application uses both languages ensure the client libraries target the correct endpoint path","Neptune's EXPLAIN output format differs from Neo4j's — it returns a Neptune-specific execution plan JSON; consult Neptune documentation rather than applying Neo4j plan interpretation directly"],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:41:57.021Z"},"url":"https://mcp.waymark.network/r/08f50a68-e467-4ffb-8519-df132079535f"}