DSE图表 - 如何从Gremlin查询中查看基础Cassandra查询?

时间:2017-10-16 08:34:12

标签: datastax-enterprise datastax-enterprise-graph

如果我在gremlin-console中执行gremlin查询,有没有办法看到DSE Graph生成的Cassandra查询?

2 个答案:

答案 0 :(得分:1)

DSE Graph为TinkerPop profile() step的结果提供了一组扩展属性 - 以下是输出的示例:

gremlin> g.V().has('recipe','name','spaghetti').profile()
==>Traversal Metrics
Step                                                               Count  Traversers       Time (ms)    % Dur
=============================================================================================================
DsegGraphStep([~label.=(recipe), name.=(spaghet...                     1           1          97.087    81.00
  query-optimizer                                                                             22.802
    \_condition=(((label = recipe) & (true)) & name = spaghetti)
  query-setup                                                                                  1.134
    \_isFitted=true
    \_isSorted=false
    \_isScan=false
  index-query                                                                                 19.838
    \_indexType=Secondary
    \_usesCache=false
    \_statement=SELECT "community_id", "member_id" FROM "junk"."recipe_p" WHERE "name" = ? LIMIT ?; with para
                ms (java.lang.String) spaghetti, (java.lang.Integer) 50000
    \_options=Options{consistency=Optional[ONE], serialConsistency=Optional.empty, fallbackConsistency=Option
              al.empty, pagingState=null, pageSize=-1, user=Optional.empty, waitForSchemaAgreement=true, asyn
              c=true}
DsegPropertyLoadStep                                                   1           1          22.772    19.00
                                            >TOTAL                     -           -         119.860        -

答案 1 :(得分:1)

斯蒂芬是对的。此功能已在5.1.2中添加。您将在5.1.2的发行说明中看到JIRA(DSP-13293)。你用的是哪个版本?