smnorris / bcfishobs

Reference BC Known Fish Observations to the Freshwater Atlas stream network
Apache License 2.0
6 stars 2 forks source link

keep species_id as an array in the distinct observations rather than code #12

Closed smnorris closed 4 years ago

smnorris commented 4 years ago

Species codes are easier to work with than ids, but by storing the ids in the array we can use https://www.postgresql.org/docs/12/intarray.html for indexed (instant) searches - I think this is worth the tradeoff.

smnorris commented 4 years ago

Turns out the species_codes array is super useful for map labels. Keep species_ids but add species_codes back into output tables/views.