EcoregionID seems to be indexed twice? PK and also manual index? Drop the latter.
Drop index on Name? Do we ever rely on SQL WHERE clauses that use Name?
IGOAttributes
Missing Index
FCode
(level_path, sequence)
IGOGeometries
Missing Index
FCode
(level_path, sequence)
General Issues
I don't think the keyword UNIQUE is needed wherever PRIMARY KEY appears. PK already ensures uniqueness and I think that this is causing redundant indexes to be created.
Assigning this to @r-k-g ... but I can take it on if you'r uncomfortable with the DDL required. I think the changes required are in this file:
packages/hydro/database/hydro_schema.sql
General Issues
UNIQUE
is needed whereverPRIMARY KEY
appears. PK already ensures uniqueness and I think that this is causing redundant indexes to be created.