Skip to content

Commit

Permalink
Updated SQL schema to include DDL for updating vacuum config for the …
Browse files Browse the repository at this point in the history
…public.values table (#26)
  • Loading branch information
zachsa committed Jan 11, 2023
1 parent 3c42d1e commit 65c5e4b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions toolkit/postgis/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,15 @@ create table if not exists public.values (
);

create unique index concurrently if not exists values_unique_cols on public.values using btree (runid desc, time_step asc, depth_level desc, coordinateid);

create index concurrently if not exists values_coordinateid on public.values using btree (coordinateid asc);

-- Optimise this table for many deleted rows
alter table public.values set (autovacuum_vacuum_cost_delay = 0.5);
alter table public.values set (autovacuum_vacuum_cost_limit = 5000);
alter table public.values set (autovacuum_vacuum_threshold = 25000000);
alter table public.values set (autovacuum_vacuum_insert_threshold = 25000000);
alter table public.values set (autovacuum_analyze_threshold = 25000000);

/**
* VIEWS
Expand Down

0 comments on commit 65c5e4b

Please sign in to comment.