Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Betts committed Jun 15, 2023
1 parent 0b6e343 commit a5e1f71
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ANALYSE report.group_type_counts;

-- A unique index is mandatory for concurrent updates used in the refresh
CREATE UNIQUE INDEX group_type_counts_created_week_group_id_sub_type_shared_idx
ON report.group_type_counts (created_week, group_id, sub_type, shared);
ON report.group_type_counts (group_id, sub_type, shared, created_week);
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ANALYSE report.group_bubbled_type_count;

-- A unique index is mandatory for concurrent updates used in the refresh
CREATE UNIQUE INDEX group_bubbled_type_count_created_week_group_id_idx
ON report.group_bubbled_type_count (created_week, group_id, sub_type, shared);
ON report.group_bubbled_type_count (group_id, sub_type, shared, created_week);
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ REFRESH MATERIALIZED VIEW report.organization_activity;
ANALYSE report.organization_activity;

-- A unique index is mandatory for concurrent updates used in the refresh
CREATE UNIQUE INDEX organization_activity_timescale_period_role_organization_id_idx ON report.organization_activity (timescale, period, role, organization_id);
CREATE INDEX organization_activity_start_date_end_date_idx ON report.organization_activity (start_date, end_date);
CREATE UNIQUE INDEX organization_activity_timescale_period_role_organization_id_idx
ON report.organization_activity (timescale, period, role, organization_id);
CREATE INDEX organization_activity_start_date_end_date_idx
ON report.organization_activity (start_date, end_date);
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ ANALYSE report.organization_annotation_types;

-- A unique index is mandatory for concurrent updates used in the refresh
CREATE UNIQUE INDEX organization_annotation_types_period_timescale_sub_type_idx
ON report.organization_annotation_types (period, timescale, sub_type, shared, organization_id);
ON report.organization_annotation_types (organization_id, timescale, sub_type, shared, period);
CREATE INDEX organization_annotation_types_start_date_end_date_idx
ON report.organization_annotation_types (start_date, end_date);

0 comments on commit a5e1f71

Please sign in to comment.