Revision 11520
Added by Aaron Marcuse-Kubitza about 11 years ago
create.sql | ||
---|---|---|
1 |
/* there is only 1 taxonobservation without a taxoninterpretation [1], so we can |
|
2 |
just include one row for each taxoninterpretation. this allows us to use the |
|
3 |
taxoninterpretation_id as the row_num. |
|
4 |
|
|
5 |
[1] |
|
6 | 1 |
SELECT * |
7 | 2 |
FROM taxonobservation |
8 | 3 |
LEFT JOIN taxoninterpretation USING (taxonobservation_id) |
9 |
WHERE taxoninterpretation_id IS NULL |
|
10 |
*/ |
|
11 |
SELECT * |
|
12 |
FROM taxoninterpretation |
|
13 |
LEFT JOIN taxonobservation USING (taxonobservation_id) |
|
14 | 4 |
LEFT JOIN plantconcept_ USING (plantconcept_id) |
15 | 5 |
LEFT JOIN plantname USING (plantname_id) |
16 |
; -- runtime: 20 s ("Time: 20279.441 ms") @starscream |
|
6 |
; -- runtime: 20 s ("18564.276") @starscream |
Also available in: Unified diff
inputs/VegBank/taxonobservation_/create.sql: join taxonobservation to taxoninterpretation (as in CVS) instead of vice versa, since taxonobservation is the primary, operative table. having VegBank and CVS do things the same way helps ensure that fixes in one can transfer easily to the other.