You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "WendelLana (via GitHub)" <gi...@apache.org> on 2023/05/15 13:50:06 UTC
[GitHub] [age] WendelLana commented on issue #920: Creating Index on nodes property
WendelLana commented on issue #920:
URL: https://github.com/apache/age/issues/920#issuecomment-1547894954
You can use the following command to create GIN indices:
```
CREATE INDEX index_name
ON graph_name."Label" USING gin (properties);
```
This GIN indices normally improves WHERE clause performance. Here is an example:
```
CREATE INDEX load_city_gin_idx
ON cypher_index."City" USING gin (properties);
SELECT * FROM cypher('cypher_index', $$
EXPLAIN MATCH (c:City {city_id: 1})
RETURN c
$$) as (n agtype);
QUERY PLAN
------------------------------------------------------------------------------------
Bitmap Heap Scan on "City" c (cost=12.00..16.02 rows=1 width=32)
Recheck Cond: (properties @> agtype_build_map('city_id'::text, '1'::agtype))
-> Bitmap Index Scan on load_city_gin_idx (cost=0.00..12.00 rows=1 width=0)
Index Cond: (properties @> agtype_build_map('city_id'::text, '1'::agtype))
(4 rows)
```
--
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