Project

General

Profile

« Previous | Next » 

Revision 10998

inputs/VegBank/taxonobservation_/create.sql: join starting with taxoninterpretation so that we can use the taxoninterpretation_id as the row_num (text strings, formed from concatenated #s cannot be used as a row_num). there is only 1 taxonobservation without a taxoninterpretation, so we can just include one row for each taxoninterpretation.

View differences:

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]
1 6
SELECT *
2 7
FROM taxonobservation
3 8
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)
4 14
LEFT JOIN plantconcept_       USING (plantconcept_id)
5 15
LEFT JOIN plantname           USING (plantname_id)
6
; -- runtime: 15 s ("Time: 14639.599 ms") @starscream
16
; -- runtime: 15 s ("Time: 15034.628 ms") @starscream

Also available in: Unified diff