Skip to content

[dataquery] Small optimizations - #11234

Open
driusan wants to merge 1 commit into
aces:mainfrom
driusan:CountOptmizations
Open

driusan wants to merge 1 commit into
aces:mainfrom
driusan:CountOptmizations

Conversation

@driusan

@driusan driusan commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

This makes 2 small optimizations for the dataquery API.

  1. There is no reason to convert the iterator of matchCandidates to an array just to get the count. Just use iterator_count in the count endpoint instead.
  2. The temporary accesscandidates table inserts all candidates at once. Do it in batches of 2000 in order to put a limit on the size of the insert statement string generated.

This makes 2 small optimizations for the dataquery API.

1. There is no reason to convert the iterator of matchCandidates to an array just to get the count.
   Just use iterator_count instead.
2. The temporary accesscandidates table inserts all candidates at once. Do it in batches of 2000
   in order to put a limit on the size of the insert statement string generated.
@github-actions github-actions Bot added Language: PHP PR or issue that update PHP code Module: dataquery PR or issue related to (new) dataquery module labels Sep 30, 2026
@HenriRabalais HenriRabalais self-assigned this Sep 30, 2026

@HenriRabalais HenriRabalais left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@driusan

looks good! approving so it can go in once the checks are green.

@HenriRabalais HenriRabalais removed their assignment Oct 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: PHP PR or issue that update PHP code Module: dataquery PR or issue related to (new) dataquery module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants