Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

rohansurana2810_190538 avatar image
rohansurana2810_190538 asked ·

What tool can I use to check the underlying Cassandra query fired by a gremlin traversal?

Hi,

In DSE 6.8, what tool can I use to check for the underlying cassandra query which is being fired when I use the graph(gremlin query) traversal to search.

The profile() method does not gives complete information.

Thank you

dsegraphgremlin
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered ·

The gremlin profile() method is probably still the best tool here, but it is incomplete in the sense that it gives the query pattern rather than the exact queries that are launched, the parameters are generally not explicitly displayed.

For example, for the query

g.V().has("person", "person_id", "person1")

the profile gives this pattern

SELECT * FROM friends.person WHERE person_id = ? / Duration: < 1 ms / Count: 1 / Index type: Table: person

but it omits the actual parameter used for "?"

Unless you have very simple queries like this one, many parallel cql queries are launched for a gremlin query, as the cql queries are launched by the various traversers needed to execute the query.

What type of query are you investigating? Perhaps we need to look at this in a different way.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.