如何在 Neo4j 中获取所有数据或仅获取数据的大小?

How do I fetch all the data or just the size of it in Neo4j?

current documentation 只展示了如何列出数据库,而不是获取所有行及其大小。如何获取数据库的大小和数量?

Here is a good blog about data profiling of a neo4j database: https://neo4j.com/blog/data-profiling-holistic-view-neo4j/

您可以获得节点和边的总数以及大小。谢谢

有多种方式:

  • 最佳:CALL apoc.meta.stats yield nodeCount, relCount
  • 不太理想:match(p) return p;

只有当您要获得数据的感觉时才应使用第二个,而第一个是显示计数的。