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/11/24 05:30:51 UTC

[GitHub] [age] Hyundong-Seo commented on issue #365: [Bitnine Tech] - When it executes VLE(Variable Length Edge) query, why it occurs an error just the first try?

Hyundong-Seo commented on issue #365:
URL: https://github.com/apache/age/issues/365#issuecomment-1325976508

   The information tested is as follows.
   1. PG11.17
   2. AGE - 1.1.0 / commit version - 4e9110d0b88812b08c316ef7df2ff07f98e3a066
   3. Ubuntu 20.04.5 LTS
   4. The start vertex is about COMMENT, the end vertex is about PERSON and the edge is about simple relation between comment and person.
   5. I don't know whether you want to see a dataset like this or other type.
   Edges greater than 2 depths may or may not exist.
   [start vertex - comment]
   {
       "id": 845661880713217,
       "label": "comment",
       "properties": {
           "id": "1236950581249",
           "__id__": 1236950581249,
           "length": "3",
           "content": "yes",
           "locationIP": "92.39.58.88",
           "browserUsed": "Chrome",
           "creationDate": "2011-08-17T14:26:59.961+0000"
       }
   }
   [edge - hascreatorcomment]
   {
       "id": 3940649673949185,
       "label": "hascreatorcomment",
       "end_id": 1981319953259400,
       "start_id": 845661880713217,
       "properties": {}
   }
   [end vertex - person]
   {
       "id": 1981319953259400,
       "label": "person",
       "properties": {
           "id": "10995116284808",
           "__id__": 10995116284808,
           "gender": "male",
           "birthday": "1982-02-04",
           "lastName": "Condariuc",
           "firstName": "Andrei",
           "locationIP": "92.39.58.88",
           "browserUsed": "Chrome",
           "creationDate": "2010-12-26T14:40:36.649+0000"
       }
   }
   6. I just executed it because I wanted to see the plan of the VLE lookup query, but an error occurred.
   But if I execute directly the same query again, it works.
   [the first try]
   ldbc=# SELECT * from cypher('test', $$
   ldbc$#   EXPLAIN ANALYZE
   ldbc$#   MATCH (v:comment)-[e:hascreatorcomment*1..3]->(v2:person)
   ldbc$#   WHERE v.id = '962072674361'
   ldbc$#   RETURN v, v2
   ldbc$# $$) as (v agtype, v2 agtype);
   ERROR:  insert_vertex_edge: failed to insert
   [The second try]
   ldbc=# SELECT * from cypher('test', $$
     EXPLAIN ANALYZE
     MATCH (v:comment)-[e:hascreatorcomment*1..3]->(v2:person)
     WHERE v.id = '962072674361'
     RETURN v, v2
   $$) as (v agtype, v2 agtype);
                                                                                      QUERY PLAN
   
   ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
   ----------
    Nested Loop  (cost=0.01..1860999881.03 rows=33830636617 width=64) (actual time=3.128..9990.038 rows=1 loops=1)
      Join Filter: age_match_vle_terminal_edge(v.id, v2.id, _age_default_alias_0.edges)
      Rows Removed by Join Filter: 9891
      ->  Nested Loop  (cost=0.01..314225.21 rows=10260000 width=267) (actual time=1.212..9976.277 rows=1 loops=1)
            ->  Seq Scan on comment v  (cost=0.00..109025.20 rows=10260 width=235) (actual time=0.420..9975.479 rows=1 loops=1)
                  Filter: (agtype_access_operator(VARIADIC ARRAY[_agtype_build_vertex(id, _label_name('41527'::oid, id), properties), '"id"'::agtype]) = '"962072674361"'
   ::agtype)
                  Rows Removed by Filter: 2052168
            ->  Function Scan on age_vle _age_default_alias_0  (cost=0.01..10.01 rows=1000 width=32) (actual time=0.785..0.787 rows=1 loops=1)
      ->  Materialize  (cost=0.00..514.38 rows=9892 width=263) (actual time=0.014..10.410 rows=9892 loops=1)
            ->  Seq Scan on person v2  (cost=0.00..464.92 rows=9892 width=263) (actual time=0.009..1.965 rows=9892 loops=1)
    Planning Time: 0.594 ms
    Execution Time: 9991.038 ms
   (12 rows)
   7. I have already checked by executing the query what I want to do, but I wonder why the error occurs only on the first try.
   
   I hope this answer has been sufficient.
   
   Hyundong


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