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

Optimize PPD large search handling #128

Open
der opened this issue Aug 18, 2023 · 0 comments
Open

Optimize PPD large search handling #128

der opened this issue Aug 18, 2023 · 0 comments
Labels
app/PPD Issues affecting the PPD service enhancement New feature or request

Comments

@der
Copy link
Member

der commented Aug 18, 2023

As noted in PPD performance investigation the ppd application could be optimized for the case where there are large return sizes.

Test case: interactive ppd query via search from which could result in a larger number of results, for example all properties in Birmingham. Select all results option.

Current process: app requests all results from the api/data store (which for the above example takes ~100s on a larger machine). However, it only renders the first 5,000 results to HTML but then scans the remainder to count the total transactions and properties in order to render its response:

Image

Proposed alternative: request with a limit of 5000. If the results return exactly 5000 (meaning there could be more available) issue a separate count query with a higher limit (e.g. 1,000,000) to complete the render.

We would need to verify the time for the count queries but it does appear that a significant part of the cost of PPD queries is the transport cost for large result sets. This would also require support for counting both properties and transactions in a single call.

Notes:

  • In the current implementation if you select at most N results the current implementation works like this; it issues a separate count query but take query only counts transactions and limits the number scanned to 10k (for performance reasons).
  • When download all data would need to remove the 5000 limit, the proposal only applies to the html-rendered form.
  • Do not propose we embark on this now, an option for future improvement that would need funding.
@der der added enhancement New feature or request app/PPD Issues affecting the PPD service labels Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/PPD Issues affecting the PPD service enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant