Skip to content

Commit

Permalink
Update create_view_area_labels.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel authored Jul 30, 2021
1 parent 50b2a80 commit a697d7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tunaatlas_sql/create_view_area_labels.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ COMMENT ON COLUMN "area"."area_labels"."source_french_label" IS '"source_french_
COMMENT ON COLUMN "area"."area_labels"."source_spanish_label" IS '"source_spanish_label" gives the label of the area in spanish.';
COMMENT ON COLUMN "area"."area_labels"."geom" IS '"geom" is the geometry stored by Postgis (SFS format).';


DROP VIEW IF EXISTS area.grid_area_labels;
CREATE MATERIALIZED VIEW area.grid_area_labels AS
SELECT * FROM area.area_labels WHERE tablesource_area = 'areas_tuna_rfmos_task2';

CREATE INDEX grid_area_labels_id_area_idx ON area.grid_area_labels (id_area);
CREATE INDEX grid_area_labels_codesource_area_idx ON area.grid_area_labels (codesource_area);


create materialized view area.grid_5deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '6%';
DROP VIEW IF EXISTS area.grid_5deg_area_labels;
create MATERIALIZED VIEW area.grid_5deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '6%';
CREATE INDEX grid_area_5deg_labels_id_area_idx ON area.grid_5deg_area_labels (id_area);
CREATE INDEX grid_area_5deg_labels_codesource_area_idx ON area.grid_5deg_area_labels (codesource_area);

create materialized view area.grid_1deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '5%';
DROP VIEW IF EXISTS area.grid_1deg_area_labels;
create MATERIALIZED VIEW area.grid_1deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '5%';
CREATE INDEX grid_area_1deg_labels_id_area_idx ON area.grid_1deg_area_labels (id_area);
CREATE INDEX grid_area_1deg_labels_codesource_area_idx ON area.grid_1deg_area_labels (codesource_area);

0 comments on commit a697d7b

Please sign in to comment.