公司主数据最大连通图分析

 

Here’s the table of contents:

  1. 数据量统计
  2. 最大连通图分析脚本

数据量统计

MATCH (n:PREPCODE) RETURN COUNT(*)
465927292
MATCH (n:PREPCODE)-->() RETURN COUNT(*)
965345392

最大连通图分析脚本

CALL algo.unionFind.stream('PREPCODE',NULL,{concurrency:8}) YIELD nodeId,setId
WITH nodeId,setId
WITH COLLECT(nodeId) AS nodeIdList,setId
WITH SIZE(nodeIdList) AS size,nodeIdList[0] AS oneId,setId
RETURN size,oneId,setId ORDER BY size DESC LIMIT 1