Skip to content

Commit

Permalink
Make apoc.meta.* to use db-statistics for total node and rel counts
Browse files Browse the repository at this point in the history
  • Loading branch information
jexp committed Feb 19, 2018
1 parent 05897dc commit 365698c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/apoc/meta/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static java.util.Collections.singletonMap;
import static java.util.stream.Collectors.toMap;
import static org.neo4j.kernel.api.ReadOperations.ANY_LABEL;
import static org.neo4j.kernel.api.ReadOperations.ANY_RELATIONSHIP_TYPE;

public class Meta {

Expand Down Expand Up @@ -255,7 +256,7 @@ public void rel(int typeId, String typeName, int labelId, String labelName, long
});

return new MetaStats(labelCount, relTypeCount, ops.propertyKeyCount(),
ops.nodesGetCount(), ops.relationshipsGetCount(), labelStats, relStats, relStatsCount);
ops.countsForNodeWithoutTxState(ANY_LABEL), ops.countsForRelationshipWithoutTxState(ANY_LABEL,ANY_RELATIONSHIP_TYPE,ANY_LABEL), labelStats, relStats, relStatsCount);
}
}

Expand Down

0 comments on commit 365698c

Please sign in to comment.