-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap the annotation type group info to a weekly grouping instead of d…
…aily This should cut down on the number of rows considerably
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
h/data_tasks/report/create_from_scratch/07_annotation_type_group_counts/02_initial_fill.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
DROP INDEX IF EXISTS report.annotation_type_group_counts_created_day_authority_id_idx; | ||
DROP INDEX IF EXISTS report.annotation_type_group_counts_created_week_authority_id_idx; | ||
|
||
REFRESH MATERIALIZED VIEW report.annotation_type_group_counts; | ||
|
||
ANALYSE report.annotation_type_group_counts; | ||
|
||
-- A unique index is mandatory for concurrent updates used in the refresh | ||
CREATE UNIQUE INDEX annotation_type_group_counts_created_day_authority_id_idx | ||
ON report.annotation_type_group_counts (created_day, authority_id, group_id, sub_type, shared); | ||
CREATE UNIQUE INDEX annotation_type_group_counts_created_week_authority_id_idx | ||
ON report.annotation_type_group_counts (created_week, authority_id, group_id, sub_type, shared); |