You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stevendanna opened this issue
Apr 19, 2024
· 0 comments
Labels
A-jobsC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.P-3Issues/test failures with no fix SLAT-jobs
As part of a larger project to reduce job system contention in the long term. The payload and progress of all jobs were moved from system.jobs to system.job_info.
While the eventual goal is that control interfaces would not require touching system.job_info, that is not true for the interim state we are currently in.
Most notably, crdb_internal.system_jobs and crdb_internal.jobs (which power commands such as SHOW JOBS and the Jobs page on the DB Console) require reading from system.job_info. And, in the worst case, requires 2 full scans of system.jobs_info which can be several GB in size in large clusters.
The long-term fix for this is two-fold:
Move data required to show basic job status out of the job's payload and progress and into a different table.
Re-write crdb_internal.system_jobs and crdb_internal.jobs as virtual views rather than virtual tables. A virtual view allows the optimizer to plan much more efficient queries and should be able to eliminate the full scans in many more cases.
The CTE in the query used for crdb_internal.system_jobs can prevent a
number of useful query optimizations.
Informs cockroachdb#122687
Release note (performance improvement): Further improves the
performance of job-system related queries.
The CTE in the query used for crdb_internal.system_jobs can prevent a
number of useful query optimizations.
Informs cockroachdb#122687
Release note (performance improvement): Further improves the
performance of job-system related queries.
stevendanna
changed the title
jobs: crdb_internal.jobs and crdb_internal.show_jobs perform poorly
jobs: crdb_internal.jobs and crdb_internal.system_jobs perform poorly
May 21, 2024
The CTE in the query used for crdb_internal.system_jobs can prevent a
number of useful query optimizations.
Informs cockroachdb#122687
Release note (performance improvement): Further improves the
performance of job-system related queries.
A-jobsC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.P-3Issues/test failures with no fix SLAT-jobs
Describe the problem
As part of a larger project to reduce job system contention in the long term. The payload and progress of all jobs were moved from
system.jobs
tosystem.job_info
.While the eventual goal is that control interfaces would not require touching
system.job_info
, that is not true for the interim state we are currently in.Most notably,
crdb_internal.system_jobs
andcrdb_internal.jobs
(which power commands such asSHOW JOBS
and the Jobs page on the DB Console) require reading fromsystem.job_info
. And, in the worst case, requires 2 full scans of system.jobs_info which can be several GB in size in large clusters.The long-term fix for this is two-fold:
Ongoing work towards this plan
Related work-arounds and issues:
Jira issue: CRDB-38028
The text was updated successfully, but these errors were encountered: