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

   @pdpotter 
   I tried the method in the link you sent, but the index is not applied.(#45)
   ```
   select create_vlabel('test', 'comment');
   CREATE UNIQUE INDEX test_comment_id_idx ON test.comment (properties);
   ```
   ```
   SELECT * FROM cypher('test', $$ EXPLAIN ANALYZE MATCH (v:comment {content: 
'thanks'}) RETURN v $$) AS (v agtype);
                                                       QUERY PLAN
   
------------------------------------------------------------------------------------------------------------------
    Seq Scan on comment v  (cost=0.00..98778.79 rows=2052 width=32) (actual 
time=0.118..2765.764 rows=85559 loops=1)
      Filter: (properties @> agtype_build_map('content'::text, 
'"thanks"'::agtype))
      Rows Removed by Filter: 1966610
    Planning Time: 0.642 ms
    Execution Time: 2773.867 ms
   (5 rows)
   ```
   ```
   SELECT * FROM cypher('test', $$ EXPLAIN ANALYZE MATCH (v:comment) where 
v.content = 'thanks' RETURN v $$) AS (v agtype);
                                                                               
QUERY PLAN
   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Seq Scan on comment v  (cost=0.00..109080.68 rows=10261 width=32) (actual 
time=0.414..9792.321 rows=85559 loops=1)
      Filter: (agtype_access_operator(VARIADIC ARRAY[_agtype_build_vertex(id, 
_label_name('25129'::oid, id), properties), '"content"'::agtype]) = 
'"thanks"'::agtype)
      Rows Removed by Filter: 1966610
    Planning Time: 0.130 ms
    Execution Time: 9802.126 ms
   (5 rows)
   ```
   Could you tell me how to execute it works in the WHERE clause as well?


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