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

Optimise query_dataset() for larger data sets #35

Open
cjrace opened this issue Oct 16, 2024 · 0 comments
Open

Optimise query_dataset() for larger data sets #35

cjrace opened this issue Oct 16, 2024 · 0 comments
Labels
enhancement Improvement to existing feature
Milestone

Comments

@cjrace
Copy link
Contributor

cjrace commented Oct 16, 2024

Is your feature request related to a problem? Please describe.

Some of the data in EES that people are wanting to query will be have millions of rows, we should do some thinking around ways to speed up queries to handle this.

Describe the solution you'd like

  1. Up the default page size to the maximum of 10,000 (feels an easy win)
  2. Look at whether we can performance test and optimise the processing needed for each API request when in a loop

Describe alternatives you've considered

Probably a few options for optimising the code here.

Also could be worth looking at how we can allow the batch processes run in parallel if the users have that ability on their end.

Additional context

Tried innocently running query_dataset("7c0e9201-c7c0-ff73-bee4-304e731ec0e6", indicators = "bqZtT") and thought it was hanging. After turning on the messages I realised it was actually just taking a very long time to run as it was getting 3,730 pages!

image

With the default 1,000 results per page it fell over after 48 mins (about halfway through a 3.7million row file).

Running with 10,000 results per page it ran much faster and completed in 14 mins, though still not particularly speedy.
image

For comparison, fetching the same file from the CSV endpoint takes 24 seconds
image

@cjrace cjrace added the enhancement Improvement to existing feature label Oct 16, 2024
@cjrace cjrace added this to the Testing sweep milestone Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing feature
Projects
None yet
Development

No branches or pull requests

1 participant