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

Query optimize this an edge count. #104

Open
okram opened this issue Mar 1, 2013 · 0 comments
Open

Query optimize this an edge count. #104

okram opened this issue Mar 1, 2013 · 0 comments

Comments

@okram
Copy link
Contributor

okram commented Mar 1, 2013

A query of this form can be made more efficient:

g.V('type', 'person').inE('friends').count()

This can be done in a single MapReduce job as you don't need to traverse out edges given that its the in the same row. The optimal way to write this is:

g.V('type,'person').transform{it.inE('friends').count()}.sum()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant