Skip to content

Perf: Replace N+1 queries with optimized WHERE IN - #3712

Open
Koc wants to merge 3 commits into
mainfrom
feature/optimize-where-in-queries
Open

Koc wants to merge 3 commits into
mainfrom
feature/optimize-where-in-queries

Conversation

@Koc

@Koc Koc commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

There are plenty of duplicated queries in ApiController::exportSubmissionsToCloud and ApiController::getSubmissions endpoints. Let's try to optimize that:

🖼️ Screenshots

image
Before After After with cache
image image image
image image image

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

@Koc
Koc force-pushed the feature/optimize-where-in-queries branch 2 times, most recently from 4f366e3 to 247b9da Compare September 28, 2026 10:26
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.15789% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Db/OptionMapper.php 0.00% 11 Missing ⚠️
lib/Db/AnswerMapper.php 0.00% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Koc
Koc force-pushed the feature/optimize-where-in-queries branch from 0856ec8 to 226c538 Compare September 28, 2026 12:07
@Koc
Koc marked this pull request as ready for review September 28, 2026 12:08
@Koc
Koc force-pushed the feature/optimize-where-in-queries branch from 2b6afa3 to 8cfb3df Compare September 28, 2026 13:55
@Chartman123 Chartman123 added php PHP related ticket 2. developing Work in progress performances Performances issues and optimisations labels Oct 4, 2026
Comment thread appinfo/info.xml
@Chartman123 Chartman123 added this to the 5.5 milestone Oct 4, 2026
Koc added 2 commits October 5, 2026 01:44
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc
Koc force-pushed the feature/optimize-where-in-queries branch from 8cfb3df to e4b3dc7 Compare October 4, 2026 23:47
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc
Koc force-pushed the feature/optimize-where-in-queries branch from e4b3dc7 to 8fb8626 Compare October 4, 2026 23:50
@Chartman123 Chartman123 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 5, 2026
@Chartman123

Copy link
Copy Markdown
Collaborator

/backport to stable5.4

@backportbot backportbot Bot added the backport-request Pending backport by the backport-bot label Oct 5, 2026
@Chartman123
Chartman123 requested a review from samin-z October 5, 2026 14:01
@Chartman123 Chartman123 removed this from the 5.5 milestone Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request Pending backport by the backport-bot performances Performances issues and optimisations php PHP related ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants