Skip to content

Conversation

@fabriziomello
Copy link
Member

No description provided.

@fabriziomello
Copy link
Member Author

Closing since we're incorporating it in the tsdb extension: timescale/timescaledb#8494

kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 22, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 22, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 25, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 25, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 25, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 25, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 25, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 25, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 26, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 26, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 26, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to kpan2034/timescaledb that referenced this pull request Aug 26, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
kpan2034 added a commit to timescale/timescaledb that referenced this pull request Aug 26, 2025
Previously a delete query was run on the `bgw_job_stat_history` table to
remove job history. This could be slow once the job history table became
very large. We now use a temporary table to keep recent history and
truncate the job history table instead. We also introduce a
`job_history_bsearch` function which finds the ids of the jobs that need
to be deleted using binary search.

This PR is based on experiments done
previously (timescale/timescaledb-extras#47).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant