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

Inefficient Retrieval of Large Amounts of Records from a Specific Vertex #236

Open
alonket opened this issue Jul 24, 2024 · 0 comments
Open

Comments

@alonket
Copy link

alonket commented Jul 24, 2024

I want to retrieve large amount of records from a vertex.

Currently my 2 options are:

  1. Using getVerticesById:
    I will get the records I need, But this method sends GET requests in a loop:
for vid in vids:
    ret += self._get(url + self._safeChar(vid))

This approach works fine for retrieving 3-10 records, but it becomes impractical for 100-1000 records, taking minutes or even hours.

  1. Using getVertices:
    I will get all the records, But this method is not suitable when dealing with vertex that have more than 1 million records.

Suggested Solution:
To improve efficiency, I propose creating a GSQL query that accepts a vertex and an ID list, returning the target vertices. This would be significantly more efficient.

Request:
Please consider replacing the getVerticesById function with a method that utilizes this GSQL query. This would eliminate the need for me to support such a query on my end.

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