Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented optimized Neo4j queries and setup #593

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Hardik301002
Copy link

Title: Improve Map Analysis Performance with Optimized Neo4j Queries

Description:

Summary: This PR implements several improvements to make the Map Analysis feature faster and more resource-efficient. It includes optimized Cypher queries, indexing for faster lookups, caching mechanisms to avoid redundant computations, and usage of APOC procedures for parallel processing.

Key Changes:

  1. Added Indexes on Standard(name) and Framework(name) to reduce NodeByLabelScan operations.

  2. Refined Cypher Queries using WITH and LIMIT clauses for smaller, more efficient batches.

  3. Implemented Caching for frequently accessed paths, minimizing redundant path calculations.

  4. Utilized APOC for timeboxed queries and parallel batch processing.

Why: Addresses Issue #587, ensuring faster response times and lower resource usage.

Testing:

Verified performance gains via PROFILE in Neo4j Browser.
Measured query execution time before and after applying indexes and caching.

Next Steps:

Further refine queries if new performance bottlenecks arise.
Update documentation as needed.

How to Test:

  1. Pull these changes and install any required dependencies (e.g., python-dotenv, neo4j).

  2. Start Neo4j and run setup_database.py to create nodes/indexes.

  3. Run query_database.py and observe improved execution times using PROFILE or logs.

@Hardik301002
Copy link
Author

Hi @northdpole, could you please take a look at this PR and provide feedback?

@Hardik301002
Copy link
Author

@northdpole Could you please review this? I have fixed the linting errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant