微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

海王星小精灵中的排序排序非常慢

如何解决海王星小精灵中的排序排序非常慢

我们正在使用 Amazon Neptune AWS 图形数据库。当我们通过它应用订单时需要花费太多时间。

g.V().
  has("Persons","_id","xxxxxxxxx-xxx-xxxx").
  out("joinGroup").
  skip(0).
  limit(100).
  project("lastActivity").
    by(__.inE("activity").
          has("display","visible").
          order().
            by("_createdOn",desc).
          limit(1).valueMap())

我只是想获得最后一次聊天并保存了一个带有组节点的聊天节点。人可以有群组,可以聊天

>  Neptune Gremlin Profile
>     
>     ===================
>     Neptune steps:
>     [
>         NeptuneGraphQueryStep(Vertex) {
>             JoinGroupNode {
>                 PatternNode[(?1,<_id>,"xxxxxxxxx-xxx-xxxx",?) . project ?1 .],{estimatedCardinality=1,indexTime=0,joinTime=0,> numSearches=1,actualTotalOutput=1}
>                 PatternNode[(?1,<~label>,?2=<Persons>,<~>) . project ask .],{estimatedCardinality=1008,?5=<joinGroup>,?3,?6) . project ?1,?3 . IsEdgeIdFilter(?6) .],{estimatedCardinality=9566,> indexTime=0,numSearches=1}
>             },finishers=[limit(100)],annotations={path=[Vertex(?1):GraphStep,Vertex(?3):VertexStep],> joinStats=true,optimizationTime=1,maxVarId=11,executionTime=901}
>         },>         NeptuneTraverserConverterStep
>     ]
>     + not converted into Neptune steps: [ProjectStep([lastActivity],[[VertexStep(IN,[activity],edge),> ProfileStep,NeptuneHasstep([display.eq(visible)]),ProfileStep,> NeptuneMemoryTrackerStep,OrderGlobalStep([[value(_createdOn),> desc]]),RangeGlobalStep(0,1),> PropertyMapStep(value),ProfileStep]])]
>     
>     WARNING: >> ProjectStep([lastActivity],ProfileStep]]) << (or one of its children) is
> not supported natively yet
>     
>     
>     Runtime (ms)
>     ============
>     Query Execution: 900.745
>     
>     Traversal Metrics
>     =================
>     Step                                                               Count  Traversers       Time (ms)    % Dur
>     -------------------------------------------------------------------------------------------------------------
>     NeptuneGraphQueryStep(Vertex)                                         53          53           1.226     0.14
>     NeptuneTraverserConverterStep                                         53          53           0.604     0.07
>     ProjectStep([lastActivity],[...                       53          53         897.957    99.80
>       VertexStep(IN,edge)                                   13671       13671          49.116
>       NeptuneHasstep([display.eq(visible)])                            12680       12680         439.631
>       OrderGlobalStep([[value(_createdOn),desc]])                        53          53         399.198
>       RangeGlobalStep(0,1)                                                53          53           0.231
>       PropertyMapStep(value)                                              53          53           7.728
>                                                 >TOTAL                     -           -         899.788        -
>     
>     Predicates
>     ==========
>     # of predicates: 403
>     
>     Results
>     =======
>     Count: 53
>     
>     Index Operations
>     ================
>     Query execution:
>         # of statement index ops: 26460
>         # of unique statement index ops: 26460
>         Duplication ratio: 1.0
>         # of terms materialized: 0

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。