You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2022/03/10 10:48:10 UTC

[GitHub] [incubator-age] Paxxxxxv-Dmitry edited a comment on issue #195: Variable Length Edges feature stucks

Paxxxxxv-Dmitry edited a comment on issue #195:
URL: https://github.com/apache/incubator-age/issues/195#issuecomment-1063907268


   **pdpotter**,
   
   > You are currently including all relations types, can this be limited?
   
   In production environment I have some relations types, but not in my sandbox. Search by all relations types is real production case. 
   
   
   > Indexes are currently not supported by Apache AGE (see https://github.com/apache/incubator-age/issues/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.
   
   Thank you for the link, I have used the workaround to fill my database with edges.
   
   
   > Running your query with EXPLAIN / EXPLAIN ANALYZE might provide more insight in how your query is executed. Please post the results below.
   
   At first want to let you know that I have changed {id: 'CI02597329'} to {ci_sm_id: 'CI02597329'}. 
   
   
   **SELECT * FROM cypher('graph', $$ EXPLAIN MATCH (z:type1)-[*..4]->(b:type2 {ci_sm_id: 'CI02597329'}) RETURN z.ci_sm_id $$) as (ci_sm_id agtype);**
   
   ```
   "Nested Loop  (cost=0.01..2954396699.74 rows=43768343623 width=32)"
   "  Join Filter: age_match_vle_terminal_edge(graphid_to_agtype(z.id), graphid_to_agtype(b.id), _age_default_alias_0.edges)"
   "  ->  Nested Loop  (cost=0.01..24093.04 rows=1203000 width=136)"
   "        ->  Seq Scan on type1 z  (cost=0.00..33.03 rows=1203 width=104)"
   "        ->  Function Scan on age_vle _age_default_alias_0  (cost=0.01..10.01 rows=1000 width=32)"
   "  ->  Materialize  (cost=0.00..9422.40 rows=109148 width=8)"
   "        ->  Seq Scan on type2 b  (cost=0.00..8876.66 rows=109148 width=8)"
   "              Filter: _property_constraint_check(properties, agtype_build_map('ci_sm_id'::text, '"CI02597329"'::agtype))"
   ```
   
   **SELECT * FROM cypher('graph', $$ EXPLAIN ANALYZE MATCH (z:type1)-[*..4]->(b:type2 {ci_sm_id: 'CI02597329'}) RETURN z.ci_sm_id $$) as (ci_sm_id agtype);**
   
   ```
   "Nested Loop  (cost=0.01..2954396699.74 rows=43768343623 width=32) (actual time=55343.648..79853.367 rows=1 loops=1)"
   "  Join Filter: age_match_vle_terminal_edge(graphid_to_agtype(z.id), graphid_to_agtype(b.id), _age_default_alias_0.edges)"
   "  Rows Removed by Join Filter: 1256960"
   "  ->  Nested Loop  (cost=0.01..24093.04 rows=1203000 width=136) (actual time=2.356..31450.736 rows=1256961 loops=1)"
   "        ->  Seq Scan on type1 z  (cost=0.00..33.03 rows=1203 width=104) (actual time=0.015..10.394 rows=1203 loops=1)"
   "        ->  Function Scan on age_vle _age_default_alias_0  (cost=0.01..10.01 rows=1000 width=32) (actual time=3.065..10.841 rows=1045 loops=1203)"
   "  ->  Materialize  (cost=0.00..9422.40 rows=109148 width=8) (actual time=0.007..0.015 rows=1 loops=1256961)"
   "        ->  Seq Scan on type2 b  (cost=0.00..8876.66 rows=109148 width=8) (actual time=217.713..546.113 rows=1 loops=1)"
   "              Filter: _property_constraint_check(properties, agtype_build_map('ci_sm_id'::text, '"CI02597329"'::agtype))"
   "              Rows Removed by Filter: 327443"
   "Planning Time: 0.106 ms"
   "Execution Time: 79853.843 ms"
   ```
   
   **SELECT * FROM cypher('graph', $$ MATCH (b:type2 {ci_sm_id: 'CI02597329'})<-[*..4]-(z:type1) RETURN z.ci_sm_id $$) as (ci_sm_id agtype);**
   
   Total query runtime: 661 msec. It works much more faster than before. Count: 1
   [*..10] - Total query runtime: 6 secs.
   


-- 
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