Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize GO statement join performance #4525

Closed
dbacyj opened this issue Aug 16, 2022 · 0 comments
Closed

Optimize GO statement join performance #4525

dbacyj opened this issue Aug 16, 2022 · 0 comments
Assignees
Labels
type/enhancement Type: make the code neat or more efficient
Milestone

Comments

@dbacyj
Copy link
Contributor

dbacyj commented Aug 16, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

3 participants