Mercurial > gemma
annotate schema/updates/1409/01.add_fm_validity_indexes.sql @ 5736:55892008ec96 default tip
Fixed a bunch of corner cases in WG import.
author | Sascha Wilde <wilde@sha-bang.de> |
---|---|
date | Wed, 29 May 2024 19:02:42 +0200 |
parents | de190de05f67 |
children |
rev | line source |
---|---|
4971
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 DO LANGUAGE plpgsql |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 $$ |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 DECLARE table_suffix varchar; |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 BEGIN |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 FOREACH table_suffix IN ARRAY ARRAY[ |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 'bcnlat_hydro', 'bcnlat_ienc', 'boycar', |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 'boylat_hydro', 'boylat_ienc', 'boysaw', |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 'boyspp', 'daymar_hydro', 'daymar_ienc', |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 'lights', 'rtpbcn', 'topmar', 'notmrk'] |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 LOOP |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 EXECUTE format( |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
12 'CREATE INDEX fairway_marks_%1$s_validity ' |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
13 'ON waterway.fairway_marks_%1$s USING GiST (validity)', |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 table_suffix); |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 END LOOP; |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 END; |
de190de05f67
Add index to speed up fairway marks imports a bit
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
17 $$; |