Project

General

Profile

« Previous | Next » 

Revision 7054

schemas/vegbien.sql: fkeys to source: Added covering indexes where needed, as described at <https://projects.nceas.ucsb.edu/nceas/issues/549>

View differences:

schemas/vegbien.my.sql
4975 4975

  
4976 4976

  
4977 4977
--
4978
-- Name: aggregateoccurrence_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4979
--
4980

  
4981
CREATE INDEX aggregateoccurrence_source_id_idx ON aggregateoccurrence  (source_id);
4982

  
4983

  
4984
--
4978 4985
-- Name: aggregateoccurrence_taxonoccurrence; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4979 4986
--
4980 4987

  
......
5136 5143

  
5137 5144

  
5138 5145
--
5146
-- Name: locationevent_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5147
--
5148

  
5149
CREATE INDEX locationevent_source_id_idx ON locationevent  (source_id);
5150

  
5151

  
5152
--
5139 5153
-- Name: locationevent_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5140 5154
--
5141 5155

  
......
5213 5227

  
5214 5228

  
5215 5229
--
5230
-- Name: party_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5231
--
5232

  
5233
CREATE INDEX party_source_id_idx ON party  (source_id);
5234

  
5235

  
5236
--
5216 5237
-- Name: party_unique_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5217 5238
--
5218 5239

  
......
5255 5276

  
5256 5277

  
5257 5278
--
5279
-- Name: plantobservation_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5280
--
5281

  
5282
CREATE INDEX plantobservation_source_id_idx ON plantobservation  (source_id);
5283

  
5284

  
5285
--
5258 5286
-- Name: plantobservation_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5259 5287
--
5260 5288

  
......
5269 5297

  
5270 5298

  
5271 5299
--
5300
-- Name: project_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5301
--
5302

  
5303
CREATE INDEX project_source_id_idx ON project  (source_id);
5304

  
5305

  
5306
--
5272 5307
-- Name: project_unique_name_date; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5273 5308
--
5274 5309

  
......
5311 5346

  
5312 5347

  
5313 5348
--
5349
-- Name: sourcename_matched_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5350
--
5351

  
5352
CREATE INDEX sourcename_matched_source_id_idx ON sourcename  (matched_source_id);
5353

  
5354

  
5355
--
5314 5356
-- Name: specimenreplicate_plantobservation; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5315 5357
--
5316 5358

  
......
5325 5367

  
5326 5368

  
5327 5369
--
5370
-- Name: specimenreplicate_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5371
--
5372

  
5373
CREATE INDEX specimenreplicate_source_id_idx ON specimenreplicate  (source_id);
5374

  
5375

  
5376
--
5328 5377
-- Name: specimenreplicate_unique_catalognumber; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5329 5378
--
5330 5379

  
......
5353 5402

  
5354 5403

  
5355 5404
--
5405
-- Name: stemobservation_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5406
--
5407

  
5408
CREATE INDEX stemobservation_source_id_idx ON stemobservation  (source_id);
5409

  
5410

  
5411
--
5356 5412
-- Name: stemobservation_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5357 5413
--
5358 5414

  
......
5388 5444

  
5389 5445

  
5390 5446
--
5447
-- Name: taxondetermination_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5448
--
5449

  
5450
CREATE INDEX taxondetermination_source_id_idx ON taxondetermination  (source_id);
5451

  
5452

  
5453
--
5391 5454
-- Name: taxondetermination_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5392 5455
--
5393 5456

  
......
5430 5493

  
5431 5494

  
5432 5495
--
5496
-- Name: taxonlabel_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5497
--
5498

  
5499
CREATE INDEX taxonlabel_source_id_idx ON taxonlabel  (source_id);
5500

  
5501

  
5502
--
5433 5503
-- Name: taxonlabel_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5434 5504
--
5435 5505

  
......
5451 5521

  
5452 5522

  
5453 5523
--
5524
-- Name: taxonoccurrence_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5525
--
5526

  
5527
CREATE INDEX taxonoccurrence_source_id_idx ON taxonoccurrence  (source_id);
5528

  
5529

  
5530
--
5454 5531
-- Name: taxonoccurrence_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5455 5532
--
5456 5533

  
schemas/vegbien.sql
6088 6088

  
6089 6089

  
6090 6090
--
6091
-- Name: aggregateoccurrence_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6092
--
6093

  
6094
CREATE INDEX aggregateoccurrence_source_id_idx ON aggregateoccurrence USING btree (source_id);
6095

  
6096

  
6097
--
6091 6098
-- Name: aggregateoccurrence_taxonoccurrence; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6092 6099
--
6093 6100

  
......
6249 6256

  
6250 6257

  
6251 6258
--
6259
-- Name: locationevent_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6260
--
6261

  
6262
CREATE INDEX locationevent_source_id_idx ON locationevent USING btree (source_id);
6263

  
6264

  
6265
--
6252 6266
-- Name: locationevent_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6253 6267
--
6254 6268

  
......
6326 6340

  
6327 6341

  
6328 6342
--
6343
-- Name: party_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6344
--
6345

  
6346
CREATE INDEX party_source_id_idx ON party USING btree (source_id);
6347

  
6348

  
6349
--
6329 6350
-- Name: party_unique_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6330 6351
--
6331 6352

  
......
6368 6389

  
6369 6390

  
6370 6391
--
6392
-- Name: plantobservation_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6393
--
6394

  
6395
CREATE INDEX plantobservation_source_id_idx ON plantobservation USING btree (source_id);
6396

  
6397

  
6398
--
6371 6399
-- Name: plantobservation_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6372 6400
--
6373 6401

  
......
6382 6410

  
6383 6411

  
6384 6412
--
6413
-- Name: project_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6414
--
6415

  
6416
CREATE INDEX project_source_id_idx ON project USING btree (source_id);
6417

  
6418

  
6419
--
6385 6420
-- Name: project_unique_name_date; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6386 6421
--
6387 6422

  
......
6424 6459

  
6425 6460

  
6426 6461
--
6462
-- Name: sourcename_matched_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6463
--
6464

  
6465
CREATE INDEX sourcename_matched_source_id_idx ON sourcename USING btree (matched_source_id);
6466

  
6467

  
6468
--
6427 6469
-- Name: specimenreplicate_plantobservation; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6428 6470
--
6429 6471

  
......
6438 6480

  
6439 6481

  
6440 6482
--
6483
-- Name: specimenreplicate_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6484
--
6485

  
6486
CREATE INDEX specimenreplicate_source_id_idx ON specimenreplicate USING btree (source_id);
6487

  
6488

  
6489
--
6441 6490
-- Name: specimenreplicate_unique_catalognumber; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6442 6491
--
6443 6492

  
......
6466 6515

  
6467 6516

  
6468 6517
--
6518
-- Name: stemobservation_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6519
--
6520

  
6521
CREATE INDEX stemobservation_source_id_idx ON stemobservation USING btree (source_id);
6522

  
6523

  
6524
--
6469 6525
-- Name: stemobservation_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6470 6526
--
6471 6527

  
......
6501 6557

  
6502 6558

  
6503 6559
--
6560
-- Name: taxondetermination_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6561
--
6562

  
6563
CREATE INDEX taxondetermination_source_id_idx ON taxondetermination USING btree (source_id);
6564

  
6565

  
6566
--
6504 6567
-- Name: taxondetermination_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6505 6568
--
6506 6569

  
......
6543 6606

  
6544 6607

  
6545 6608
--
6609
-- Name: taxonlabel_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6610
--
6611

  
6612
CREATE INDEX taxonlabel_source_id_idx ON taxonlabel USING btree (source_id);
6613

  
6614

  
6615
--
6546 6616
-- Name: taxonlabel_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6547 6617
--
6548 6618

  
......
6564 6634

  
6565 6635

  
6566 6636
--
6637
-- Name: taxonoccurrence_source_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6638
--
6639

  
6640
CREATE INDEX taxonoccurrence_source_id_idx ON taxonoccurrence USING btree (source_id);
6641

  
6642

  
6643
--
6567 6644
-- Name: taxonoccurrence_unique_within_creator; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6568 6645
--
6569 6646

  

Also available in: Unified diff