neo4j-query-tuning-skill

Diagnoses slow Neo4j Cypher queries by interpreting execution plans and prescribing index and rewrite fixes.

Updated Aug 25, 2026
One-click install
npx skills add https://github.com/cardox6/steuer-graph --skill neo4j-query-tuning-skill-cardox6
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neo4j-query-tuning-skill
Source: https://github.com/cardox6/steuer-graph/tree/main/.agents/skills/neo4j-query-tuning-skill
Command: npx skills add https://github.com/cardox6/steuer-graph --skill neo4j-query-tuning-skill-cardox6

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Slow Cypher queries in Neo4j are hard to root-cause without understanding execution plans, operator behavior, and planner statistics. This Skill turns raw EXPLAIN/PROFILE output into concrete fixes such as missing indexes, hint usage, query rewrites, and runtime selection. ## Core Features & Use Cases - Plan Interpretation: Reads EXPLAIN and PROFILE output bottom-up, flagging bad operators like AllNodesScan, NodeByLabelScan, CartesianProduct, and Eager with targeted fixes. - Index & Statistics Management: Checks index health with SHOW INDEXES, creates RANGE/TEXT/composite indexes, and forces replanning via db.prepareForReplanning or db.resampleIndex when cardinality estimates diverge. - Runtime & Monitoring Guidance: Advises on slotted vs pipelined vs parallel runtimes and live query monitoring with SHOW QUERIES, SHOW TRANSACTIONS, and TERMINATE TRANSACTION. - Use Case: A MATCH query on Person by email scans millions of nodes. The Skill identifies the NodeByLabelScan, creates a RANGE index on Person(email), re-runs PROFILE twice, and confirms dbHits dropped and NodeIndexSeek replaced the scan. ## Quick Start Ask the agent to analyze this slow Cypher query's PROFILE output and tell me which index or rewrite will fix it.

Frequently Asked Questions about neo4j-query-tuning-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a slow Cypher query in Neo4j?▼

Run EXPLAIN first to inspect the plan without execution cost, then look for AllNodesScan, NodeByLabelScan, CartesianProduct, or Eager operators. Create the missing index, wait for it to reach ONLINE state, and run PROFILE twice to compare dbHits before and after.

What is the difference between EXPLAIN and PROFILE in Neo4j?▼

EXPLAIN shows the planned operators and estimatedRows without executing the query, costing nothing. PROFILE actually executes the query and reports real rows and dbHits, so run it twice since the first run warms the page cache.

Why does my Neo4j query show AllNodesScan or NodeByLabelScan?▼

These operators mean no usable index exists for the lookup property, so Neo4j scans every node. Create a RANGE index on the label and property used in the WHERE predicate, or force an existing index with a USING INDEX hint.

Which index type supports CONTAINS and ENDS WITH in Neo4j?▼

Only TEXT indexes support CONTAINS and ENDS WITH predicates; RANGE indexes do not. Create one with CREATE TEXT INDEX on the target label and property, after which the planner uses NodeIndexContainsScan.

When should I use the parallel runtime in Neo4j?▼

Use CYPHER 25 runtime=parallel for large analytical scans and aggregations on Enterprise or Aura Pro 2025+. Avoid it for OLTP workloads, writes, and short queries, where the default pipelined runtime performs better.

How do I kill a long-running Neo4j query?▼

Run SHOW QUERIES or SHOW TRANSACTIONS to find the queryId or transactionId of the offending statement, then execute TERMINATE QUERY or TERMINATE TRANSACTION with that identifier. Viewing other users' queries requires Enterprise edition.