You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "cho2hhun (via GitHub)" <gi...@apache.org> on 2023/09/21 01:13:33 UTC
[GitHub] [age] cho2hhun opened a new issue, #1239: [Query Plan]Is it possible to see the query plan for CYPHER?
cho2hhun opened a new issue, #1239:
URL: https://github.com/apache/age/issues/1239
I hava a question that I want to see Query Plan for Cypher which runs in AGE's Graph DB
But I think it is not possible see Query Plan for Cypher, only can see SQL Query Plan
In the case of Agens Graph, it was possible to query plan for Graph Query
Because of Comment processing of Cypher with Dollar-quotation(**$$** match~ return ~ **$$**), it is not read in PG enviroment, and cannot return Query plan for Cypher
If you folks know how to see the query plan for Cypher in AGE GDB, please let me share it!
It is important to save the cost for Query to see the Graph DB query Process
Thank you
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] jrgemignani commented on issue #1239: [Query Plan]Is it possible to see the query plan for CYPHER?
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1239:
URL: https://github.com/apache/age/issues/1239#issuecomment-1734308809
@cho2hhun If this is resolved, please close it :)
--
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
Re: [I] [Query Plan]Is it possible to see the query plan for CYPHER? [age]
Posted by "cho2hhun (via GitHub)" <gi...@apache.org>.
cho2hhun closed issue #1239: [Query Plan]Is it possible to see the query plan for CYPHER?
URL: https://github.com/apache/age/issues/1239
--
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
[GitHub] [age] markgomer commented on issue #1239: [Query Plan]Is it possible to see the query plan for CYPHER?
Posted by "markgomer (via GitHub)" <gi...@apache.org>.
markgomer commented on issue #1239:
URL: https://github.com/apache/age/issues/1239#issuecomment-1730192767
Hi @cho2hhun!
You can put the command EXPLAIN with the cypher queries, but AGE still is PostgreSQL tables arranged as a graph, so it is essentially transforming the Cypher query into an SQL query that operates on PostgreSQL tables:
```cypher
test=# SELECT * FROM cypher('agload',
$$
EXPLAIN MATCH (co:Country {name:"Albania"})-[e]-(ci:City)
RETURN co, e, ci
$$)
as (co agtype, e agtype, ci agtype);
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------
Nested Loop (cost=0.00..118223792.34 rows=725 width=96)
Join Filter: (((e.start_id = co.id) AND (e.end_id = ci.id)) OR ((e.end_id = co.id) AND (e.start_id = ci.id)))
-> Nested Loop (cost=0.00..3656.49 rows=72485 width=614)
-> Seq Scan on "Country" co (cost=0.00..3.79 rows=1 width=402)
Filter: (properties @> agtype_build_map('name'::text, '"Albania"'::agtype))
-> Seq Scan on "City" ci (cost=0.00..2927.85 rows=72485 width=212)
-> Materialize (cost=0.00..1982.71 rows=72486 width=29)
-> Append (cost=0.00..1620.28 rows=72486 width=29)
-> Seq Scan on _ag_label_edge e_1 (cost=0.00..0.00 rows=1 width=56)
-> Seq Scan on has_city e_2 (cost=0.00..1257.85 rows=72485 width=29)
(10 rows)
```
With EXPLAIN, you can still get insights into the query's cost and how you might optimize it, though.
To see how the Cypher is transformed into SQL, you might want to execute the query with a debugger, like GDB.
--
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
[GitHub] [age] cho2hhun commented on issue #1239: [Query Plan]Is it possible to see the query plan for CYPHER?
Posted by "cho2hhun (via GitHub)" <gi...@apache.org>.
cho2hhun commented on issue #1239:
URL: https://github.com/apache/age/issues/1239#issuecomment-1730821560
Oh gosh, Thanks a lot. I missed it. indeed, I normaly use ```EXPLAIN``` clause in front of ```SELECT``` query...... but it was really really simple solution! appriciate it really
--
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