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

[master < T1227] Optimise iteration #1227

Merged
merged 2 commits into from
Sep 9, 2023
Merged

[master < T1227] Optimise iteration #1227

merged 2 commits into from
Sep 9, 2023

Conversation

Ignition
Copy link
Contributor

@Ignition Ignition commented Sep 6, 2023

For example following query:

UNWIND RANGE (1, 500) AS i CREATE ();
MATCH (),(),() RETURN COUNT(*);

went from 6.549 seconds to 3.625 seconds

To keep docs changelog up to date, one more thing to do:

  • Write a release note here, including added/changed clauses --> "Optimizations to scanning vertices"
  • Tag someone from docs team in the comments

@Ignition Ignition self-assigned this Sep 6, 2023
@Ignition Ignition marked this pull request as ready for review September 6, 2023 11:52
Copy link
Contributor

@andrejtonev andrejtonev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

src/query/plan/operator.cpp Show resolved Hide resolved
src/storage/v2/all_vertices_iterable.cpp Show resolved Hide resolved
@Josipmrden Josipmrden changed the title [ master < ] Optimise iteration [ master < T1227] Optimise iteration Sep 6, 2023
@Josipmrden Josipmrden changed the title [ master < T1227] Optimise iteration [master < T1227] Optimise iteration Sep 6, 2023
Query like:
UNWIND RANGE (1, 500) AS i CREATE ();
MATCH (),(),() RETURN COUNT(*);

went from 6.549 sec to 3.625 sec
@gitbuda
Copy link
Member

gitbuda commented Sep 9, 2023

@vpavicic this probably requires a bit more attention in the changelog because it's a significant improvement (100%) in the case where there is a lot of iterations over graph entities, the query @Ignition put into the description is just one example, but I think this optimization applies in many cases 👀 @Ignition maybe you can add a bit more details from the user perspective (e.g. what's the real world query that will benefit out of this) 😃

@gitbuda gitbuda modified the milestones: mg-v2.12.0, mg-v2.11.0 Sep 9, 2023
@gitbuda gitbuda merged commit ab56abf into master Sep 9, 2023
6 checks passed
@gitbuda gitbuda deleted the MG_better_iteration branch September 9, 2023 14:09
@vpavicic vpavicic added the Docs - changelog only Docs - changelog only label Sep 12, 2023
@vpavicic
Copy link
Contributor

@Ignition Do you have any more queries to show the usage/benefits?

@Ignition
Copy link
Contributor Author

@vpavicic not really, the query I optimized around demonstrated ScanAll performance gain. But I expect real usecase would be more complex. Hence IMO other parts of the plan would dominate the execution profile.

as51340 pushed a commit that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants