You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "AbdulSamad4068 (via GitHub)" <gi...@apache.org> on 2023/06/13 08:47:17 UTC

[GitHub] [age] AbdulSamad4068 commented on issue #982: Analyse MATCH clause performance (relationship basics)

AbdulSamad4068 commented on issue #982:
URL: https://github.com/apache/age/issues/982#issuecomment-1588837823

   The performance of the MATCH clause in Apache AgeDB (relationship basics) is influenced by the size and complexity of the graph, including the number of vertices and edges. Query execution may slow down with larger graphs or deep relationships. 
   
   To improve performance, appropriate indexing of relevant properties and labels used in the MATCH clause, like creating an index on the "name" property of the "User" label, can be beneficial. Query complexity, including the number of patterns and traversal depth, also impacts performance, and simplifying queries by reducing unnecessary patterns and limiting traversal depth can enhance execution speed. Apache AgeDB's query planner optimizes MATCH clause execution plans by considering available indexes, statistics, and cost estimates to determine the most efficient approach.
   
   Consider the following query that retrieves all friends of a user:
   ```
   MATCH (user:User {id: 123})-[:FRIEND]->(friend:User)
   RETURN friend.name
   ```
   
   In this case, the performance of the MATCH clause can be influenced by the graph size, the presence of an index on the "id" property of "User," and the efficiency of the query plan generated by the optimizer. By carefully considering these factors we can optimize the performance of MATCH clause


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org