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

Internal query iterator's batch size limit is undefined (Firestore Datastore) #7852

Open
calsmith opened this issue Nov 22, 2024 · 0 comments

Comments

@calsmith
Copy link
Contributor

This library returns an iterator for queries. If no limit is specified, the iterator will continue until there are no results remaining e.g.

$datastore = new DatastoreClient();
$query = $datastore->query()
    ->kind('Task')
    ->filter('done', '=', false);

$iterator = $datastore->runQuery($query);
foreach ($iterator as $entity) {
    ...
}

What is the default value of limit if none is set? In other words, what is the max size of batches (pages) used by the internal iterator?

This is not documented in limits or in the Query reference.

Why this matters?
We need to know that the max value of limit so we can maximize throughput performance of batch processing of query results. There are some mentions of setBatchSize() in the Python library but this is not documented anywhere either. Additionally, we often need to batchInsert() n entities using results from the iterator and need to know the max size of each page.

Thank you

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