151 | | }}} |
| 151 | |
| 152 | UPDATE uga2010.id_drain_uga set uga='Adour' where id_drain in ('108801','108802'); |
| 153 | UPDATE uga2010.id_drain_uga set uga='Garonne' where id_drain in ('100194','100151','100147','100123','100124','100102','109173','109156','109157'); |
| 154 | }}} |
| 155 | |
| 156 | == RHT par UGA == |
| 157 | {{{ |
| 158 | #!sql |
| 159 | drop table if exists rht.rhtvs2_Adour; |
| 160 | create table rht.rhtvs2_Adour as ( |
| 161 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Adour')); ---lines |
| 162 | CREATE INDEX indexid_drainAdour |
| 163 | ON rht.rhtvs2_Adour |
| 164 | USING btree (id_drain); |
| 165 | |
| 166 | drop table if exists rht.rhtvs2_Bretagne; |
| 167 | create table rht.rhtvs2_Bretagne as ( |
| 168 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Bretagne')); ---6466lines |
| 169 | CREATE INDEX indexid_drainBretagne |
| 170 | ON rht.rhtvs2_Bretagne |
| 171 | USING btree (id_drain); |
| 172 | |
| 173 | drop table if exists rht.rhtvs2_Garonne; |
| 174 | create table rht.rhtvs2_Garonne as ( |
| 175 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Garonne')); ---lines |
| 176 | CREATE INDEX indexid_drainGaronne |
| 177 | ON rht.rhtvs2_Garonne |
| 178 | USING btree (id_drain); |
| 179 | |
| 180 | drop table if exists rht.rhtvs2_Rhin; |
| 181 | create table rht.rhtvs2_Rhin as ( |
| 182 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Rhin')); ---lines |
| 183 | CREATE INDEX indexid_drainRhin |
| 184 | ON rht.rhtvs2_Rhin |
| 185 | USING btree (id_drain); |
| 186 | |
| 187 | drop table if exists rht.rhtvs2_Meuse; |
| 188 | create table rht.rhtvs2_Meuse as ( |
| 189 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Meuse')); ---lines |
| 190 | CREATE INDEX indexid_drainMeuse |
| 191 | ON rht.rhtvs2_Meuse |
| 192 | USING btree (id_drain); |
| 193 | |
| 194 | drop table if exists rht.rhtvs2_Loire; |
| 195 | create table rht.rhtvs2_Loire as ( |
| 196 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Loire')); ---lines |
| 197 | CREATE INDEX indexid_drainLoire |
| 198 | ON rht.rhtvs2_Loire |
| 199 | USING btree (id_drain); |
| 200 | |
| 201 | drop table if exists rht.rhtvs2_SeineNormandie; |
| 202 | create table rht.rhtvs2_SeineNormandie as ( |
| 203 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Seine-Normandie')); ---lines |
| 204 | CREATE INDEX indexid_drainSeineNormandie |
| 205 | ON rht.rhtvs2_SeineNormandie |
| 206 | USING btree (id_drain); |
| 207 | |
| 208 | drop table if exists rht.rhtvs2_Corse; |
| 209 | create table rht.rhtvs2_Corse as ( |
| 210 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Corse')); ---lines |
| 211 | CREATE INDEX indexid_drainCorse |
| 212 | ON rht.rhtvs2_Corse |
| 213 | USING btree (id_drain); |
| 214 | |
| 215 | drop table if exists rht.rhtvs2_ArtoisPicardie; |
| 216 | create table rht.rhtvs2_ArtoisPicardie as ( |
| 217 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Artois-Picardie')); ---lines |
| 218 | CREATE INDEX indexid_drainArtoisPicardie |
| 219 | ON rht.rhtvs2_ArtoisPicardie |
| 220 | USING btree (id_drain); |
| 221 | |
| 222 | drop table if exists rht.rhtvs2_RhoneMediterranee; |
| 223 | create table rht.rhtvs2_RhoneMediterranee as ( |
| 224 | select * from rht.rhtvs2 where id_drain in (select id_drain from uga2010.id_drain_uga where uga='Rhone-Mediterranee')); ---lines |
| 225 | CREATE INDEX indexid_drainRhoneMediterranee |
| 226 | ON rht.rhtvs2_RhoneMediterranee |
| 227 | USING btree (id_drain); |
| 228 | }}} |