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

Make LIMIT be processed in the driver level #162

Open
rogerlucena opened this issue Nov 18, 2020 · 0 comments
Open

Make LIMIT be processed in the driver level #162

rogerlucena opened this issue Nov 18, 2020 · 0 comments

Comments

@rogerlucena
Copy link
Contributor

rogerlucena commented Nov 18, 2020

At the moment, it seems that only for the g.Triples driver call, in data_access.go, the LIMIT information (stmLimit variable there) is being passed to the driver through the MaxElements field of LookupOptions.

For the other driver calls this MaxElements field of LookupOptions does not seem to be used, and the LIMIT operation is apparently executed solely in the planner level (after all the data was already returned from the driver), truncating the result table with the queryPlan.limit() method. This is not optimal as there was no need to return all that data from the driver just for it to be truncated later, with only a portion of it being useful.

Then, the performance could be a little better if this LIMIT processing was done directly in the driver level, as it already seems to be the case for g.Triples.

N.B. Note that there is a difference between rows in the table result and triples returned from a driver call (for more on that, refer to addTriples in data_access.go). Be attentive when truncating one or the other as for the final result to still be what is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant