Skip to content

[IMP] queue_job_batch: improve perf#932

Open
hoangtrann wants to merge 1 commit intoOCA:18.0from
hoangtrann:18.0_imp-queue-job-batch-perf
Open

[IMP] queue_job_batch: improve perf#932
hoangtrann wants to merge 1 commit intoOCA:18.0from
hoangtrann:18.0_imp-queue-job-batch-perf

Conversation

@hoangtrann
Copy link
Copy Markdown
Contributor

In an instance with a lot of queue jobs, lacking index on job_batch_id and proper read_group on job batch can lead to full seq scan on db and cause performance degrade.

Before the changes, on a local database with roughly 100k rows and 10% of it having job_batch_id

Function Execution Time (before) Execution Time (after)
_compute_job_count 6.971ms 1.611ms

On a production database where the performance issue occurs, the time it takes to execute the query is actually much worst

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants