pdpotter commented on issue #195:
URL: https://github.com/apache/incubator-age/issues/195#issuecomment-1063820358


   Some thoughts:
   * The id attribute for node b is defined, depending on the relations in the 
graph, multiple z nodes could be returned for your query.
   * You are currently including all relations types, can this be limited?
   * Indexes are currently not supported by Apache AGE (see #45). I don't think 
your query would benefit a lot from using indices though, since it seems to be 
a scalability issue related to the number of relations.
   * Running your query with `EXPLAIN` / `EXPLAIN ANALYZE` might provide more 
insight in how your query is executed. Please post the results below:
   ```
   SELECT * FROM cypher('graph', $$ EXPLAIN MATCH (z:type1)-[*..4]->(b:type2 
{id: 'CI02597329'}) RETURN z.id $$) as (id agtype);
   ```
   ```
   SELECT * FROM cypher('graph', $$ EXPLAIN ANALYZE MATCH 
(z:type1)-[*..4]->(b:type2 {id: 'CI02597329'}) RETURN z.id $$) as (id agtype);
   ```
   * Inversing the query should give the execution path and same performance, 
but it is easy to do, so maybe worth trying:
   ```
   SELECT * FROM cypher('graph', $$ MATCH (b:type2 {id: 
'CI02597329'})<-[*..4]-(z:type1) RETURN z.id $$) as (id agtype);
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to