Skip to content

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

@alonket

Description

@alonket

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions