nebula cypher 机器oom

我没说清楚,直接用下面的 query 吧:

match (m:`USER`) where id(m) in ["1510615318"] 
optional match (m)-[r1:CALL_TO]-(x:MOBILE)-[:APPLY_FOR]->(a1:APPL)-[:APPLY_ON]-(t1:`TIME`)
where r1.first_callmark_on<=20220602 and t1.`TIME`.`date`<='2022-06-02'
optional match (x)-[r2:CALL_TO]-(n:`USER`) 
where r2.first_callmark_on<=20220602 and id(n)<>'1510615318'
optional match (n:MOBILE)<-[r3:CBK_STATE_ENTERPRISE_LEADER]-(y1:`USER`) 
where r3.first_cbkmark_on<=20220602 and id(n)<>id(y1)
optional match (n:MOBILE)<-[r4:CBK_ENGINEER]-(y2:`USER`)
where r4.first_cbkmark_on<=20220602 and id(n)<>id(y2)
optional match (n:MOBILE)-[:APPLY_FOR]->(a2:APPL)-[:APPLY_ON]->(t2:`TIME`) 
where t2.`TIME`.`date`<='2022-06-02'
optional match (n:MOBILE)-[:APPLY_FOR]->(a3:LOAN_BK)-[:APPLY_ON]->(t3:`TIME`) 
where t3.`TIME`.`date`<='2022-06-02'
optional match (n:MOBILE)-[:APPLY_FOR]->(a4:LOAN_BK)-[:M2_ON]->(t4:`TIME`) 
where t4.`TIME`.`date`<='2022-06-02'
optional match (n:MOBILE)-[:APPLY_FOR]->(a5:A_BLACK_LIST)-[:APPLY_ON]->(t5:`TIME`)
where t5.`TIME`.`date`<='2022-06-02'
optional match (n:MOBILE)-[:APPLY_FOR]->(a6:C_BLACK_LIST)-[:APPLY_ON]->(t6:`TIME`) 
where t6.`TIME`.`date`<='2022-06-02'
return 
  count(distinct x) as n_appl_1st_v4,
  count(distinct n) as n_user_2nd_v4,
  count(case when "MOBILE" in labels(n) then n else null end) as n_mobile_2nd_v4,
  count(distinct a2) as n_appl_2nd_v4,
  count(distinct y1) AS n_cbkin_State_enterprise_leader_2nd_v4,
  count(distinct y2) AS n_cbkin_Engineer_2nd_v4,
  count(distinct a3) as n_bk_2nd_v4,
  count(distinct a4) AS n_bad30p_2nd_v4,
  count(distinct a5) AS n_ablk_2nd_v4,
  count(distinct a6) AS n_cblk_2nd_v4,
  count(case when 'ORG' in labels(n) then n else null end) as n_org_2nd_v4,
  count(case when 'EXPRESS' in labels(n) then n else null end) as n_express_2nd_v4,
  count(case when 'AGENCY' in labels(n) then n else null end) as n_agency_2nd_v4,
  count(case when 'BNK_ORG' in labels(n) then n else null end) as n_bnk_org_2nd_v4,
  count(case when 'OTHER_ORG' in labels(n) then n else null end) as n_other_org_2nd_v4
2 个赞