Mercurial > gemma
annotate schema/updates/1409/01.add_fm_validity_indexes.sql @ 5560:f2204f91d286
Join the log lines of imports to the log exports to recover data from them.
Used in SR export to extract information that where in the meta json
but now are only found in the log.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 09 Feb 2022 18:34:40 +0100 |
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 $$; |