Skip to content

Optimize GO statement join performance #4525

Closed
@dbacyj

Description

@dbacyj

Introduction

nGQL:


LOOKUP ON COVID19 YIELD id(vertex) as id | \
GO FROM $-.id OVER visit \
WHERE (visit.leaveTime - visit.arriveTime) >= 600000 \
YIELD visit._src AS src_id, visit._dst AS dst_id, visit.arriveTime AS arriveTime, visit.leaveTime AS leaveTime, visit.totalVisitTime AS totalVisitTime | \
GO FROM $-.dst_id OVER visit REVERSELY \
WHERE ((visit.arriveTime < $-.arriveTime AND visit.leaveTime - $-.arriveTime >= 600000) \
OR (visit.arriveTime >= $-.arriveTime AND visit.leaveTime <= $-.leaveTime AND visit.leaveTime - visit.arriveTime >= 600000) \
OR (visit.arriveTime >= $-.arriveTime AND visit.leaveTime > $-.leaveTime AND $-.leaveTime - visit.arriveTime >= 600000)) \
AND ($-.totalVisitTime >=108000000 OR visit.totalVisitTime >=108000000) \YIELD $-.src_id as src, visit._dst as dst;


profile:
image

stats:
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type/enhancementType: make the code neat or more efficient

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions