Re: Faster distinct query?
От
Rob Sargent
Тема
Re: Faster distinct query?
Дата
Msg-id
13e62549-ffa1-712e-39f4-cfc42aaf25e3@gmail.com
Ответ на
Re: Faster distinct query? (Israel Brewster)
Список
Дерево обсуждения
Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? hubert depesz lubaczewski <depesz@depesz.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Ryan Booz <ryan@timescale.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Rob Sargent <robjsargent@gmail.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Rob Sargent <robjsargent@gmail.com>
Re: Faster distinct query? Geoff Winkless <pgsqladmin@geoff.dj>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Michael Lewis <mlewis@entrata.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Michael Lewis <mlewis@entrata.com>
Re: Faster distinct query? David Rowley <dgrowleyml@gmail.com>
Re: Faster distinct query? "David G. Johnston" <david.g.johnston@gmail.com>
Re: Faster distinct query? Tom Lane <tgl@sss.pgh.pa.us>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Michael Lewis <mlewis@entrata.com>
Re: Faster distinct query? Tom Lane <tgl@sss.pgh.pa.us>
Re: Faster distinct query? David Rowley <dgrowleyml@gmail.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? David Rowley <dgrowleyml@gmail.com>
Re: Faster distinct query? "David G. Johnston" <david.g.johnston@gmail.com>
Re: Faster distinct query? David Rowley <dgrowleyml@gmail.com>
Re: Faster distinct query? Ryan Booz <ryan@timescale.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Ryan Booz <ryan@timescale.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Ryan Booz <ryan@timescale.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
Re: Faster distinct query? Ryan Booz <ryan@timescale.com>
Re: Faster distinct query? "David G. Johnston" <david.g.johnston@gmail.com>
Re: Faster distinct query? Mladen Gogala <gogala.mladen@gmail.com>
Re: Faster distinct query? Israel Brewster <ijbrewster@alaska.edu>
I would look into pre-loading the lookup table (and pre-emptive maintenance). Add the foreign key, but not the trigger. > > That makes sense. Thanks! > 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.
В списке pgsql-general по дате отправления