Yeah, then I got to wondering: Do you care? Are these stations likely to be spoofed? You have the station id and type in you data table and essentially the same in your lookup table. If you're not replacing the id+type in your data table with a lookup id you really don't need to even have a foreign key. Maybe sync them regularly but I'm not seeing the value in the runtime overhead. Now presumably the station table is entirely pinned in memory and foreign key check might not be much overhead but it won't be zero.That makes sense. Thanks!
I would look into pre-loading the lookup table (and pre-emptive
maintenance). Add the foreign key, but not the trigger.
- Re: Faster distinct query? Israel Brewster
- Re: Faster distinct query? David Rowley
- Re: Faster distinct query? David G. Johnston
- Re: Faster distinct query? David Rowley
- Re: Faster distinct query? David Rowley
- Re: Faster distinct query? hubert depesz lubaczewski
- Re: Faster distinct query? Ryan Booz
- Re: Faster distinct query? Israel Brewster
- Re: Faster distinct query? Rob Sargent
- Re: Faster distinct query? Israel Brewster
- Re: Faster distinct query? Rob Sargent
- Re: Faster distinct query? Israel Brewster
- Re: Faster distinct query? Geoff Winkless
- Re: Faster distinct query? Israel Brewster
- Re: Faster distinct query? Michael Lewis
- Re: Faster distinct query? Israel Brewster