Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order chunks for compression by range_start #7148

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .unreleased/pr_7148
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Implements: #7148 Order chunks for compression by range_start
4 changes: 4 additions & 0 deletions sql/policy_internal.sql
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ BEGIN
INNER JOIN pg_class pgc ON pgc.oid = show.oid
INNER JOIN pg_namespace pgns ON pgc.relnamespace = pgns.oid
INNER JOIN _timescaledb_catalog.chunk ch ON ch.table_name = pgc.relname AND ch.schema_name = pgns.nspname AND ch.hypertable_id = htid
INNER JOIN _timescaledb_catalog.chunk_constraint cc ON ch.id = cc.chunk_id
INNER JOIN _timescaledb_catalog.dimension d ON d.hypertable_id = ch.hypertable_id
INNER JOIN _timescaledb_catalog.dimension_slice ds ON d.id = ds.dimension_id AND cc.dimension_slice_id = ds.id
WHERE
NOT ch.dropped AND NOT ch.osm_chunk
AND (
Expand All @@ -105,6 +108,7 @@ BEGIN
)
)
)
ORDER BY ds.range_start
LOOP
IF chunk_rec.status = 0 THEN
BEGIN
Expand Down
Loading