Re: Question related to profile() method
Shiva Krishnan <shivain...@...>
Thanks a lot for your quick reply @Florian. It really worked well !! Just one more question related to profiling. I have a vertex-centric index which is created for the edge. gremlin > edgeLabel = mgmt.getEdgeLabel(JConstsObj.ELBL_LINK); gremlin > assocKind= mgmt.getPropertyKey('assocKind') gremlin > mgmt.buildEdgeIndex(edgeLabel, "myVertexCentricIndex", Direction.BOTH, assocKind); //The above index creation code was executed before adding the vertex and edges. Now after adding two vertex and one edge between them , I have used the below query to fetch the edge and its profiling information. gremlin> g.V().has('_objId','GRData05051006://GRData05051006').bothE().hasLabel('link').has('assocKind',12) ==>e[4e1f-b6g-1bit-1pqw][14488-link->80024] //above works fine gremlin> g.V().has('objId','GRData05051006://GRData05051006').bothE().hasLabel('link').has('assocKind',12).profile() ==>Traversal Metrics Step Count Traversers Time (ms) % Dur ============================================================================================================= JanusGraphStep([],[_objId.eq(GRData05051006://G... 1 1 1.967 52.44 \_condition=(_objId = GRData05051006://GRData05051006) \_isFitted=true \_query=multiKSQ[1]@2147483647 \_index=idxVerticesByObjId \_orders=[] \_isOrdered=true optimization 1.097 JanusGraphVertexStep([_assocKind1.eq(12)]) 2 2 1.784 47.56 \_condition=(_assocKind1 = 12 AND type[link]) \_isFitted=true \_vertices=1 \_query=org.janusgraph.diskstorage.keycolumnvalue.SliceQuery@77b45c39 \_orders=[] \_isOrdered=true optimization 0.958 >TOTAL - - 3.752 - If you notice the profiling for the first part of the query(to fetch vertex for given obj id), it gave me the proper index which is getting used(highligthed in yellow). Similarly the second part of the query fetches the edges which has label 'link' and 'assocKind' 12. But it is not printing the index name in the profile information. (I guess it must be using the index to fetch the edge as i'm not getting any warning to use index for query) Any idea on this?
On Monday, May 4, 2020 at 7:57:29 PM UTC+5:30, Florian Hockmann wrote:
|
|