Re: Optimising a two column OR check
От
Andrew Gierth
Тема
Re: Optimising a two column OR check
Дата
Msg-id
87imotx5uq.fsf@news-spur.riddles.org.uk
Ответ на
Re: Optimising a two column OR check (MichaelDBA)
Список
Дерево обсуждения
Optimising a two column OR check Ivan Voras <ivoras@gmail.com>
Re: Optimising a two column OR check Justin Pryzby <pryzby@telsasoft.com>
Re: Optimising a two column OR check Jeff Janes <jeff.janes@gmail.com>
Re: Optimising a two column OR check MichaelDBA <MichaelDBA@sqlexec.com>
Re: Optimising a two column OR check Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: Optimising a two column OR check MichaelDBA <MichaelDBA@sqlexec.com>
Re: Optimising a two column OR check MichaelDBA <MichaelDBA@sqlexec.com>
Re: Optimising a two column OR check Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: Optimising a two column OR check MichaelDBA <MichaelDBA@sqlexec.com>
Re: Optimising a two column OR check Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: Optimising a two column OR check Ivan Voras <ivoras@gmail.com>
Re: Optimising a two column OR check MichaelDBA <MichaelDBA@sqlexec.com>
Re: Optimising a two column OR check Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: Optimising a two column OR check Ivan Voras <ivoras@gmail.com>
>>>>> "MichaelDBA" == MichaelDBA writes: MichaelDBA> Yep, you're right, Andrew, adding a couple rows made it do MichaelDBA> the index only scan. I reckon I got misled by turning off MichaelDBA> sequential scans, thinking that actual rows were not MichaelDBA> important anymore. Overly simplistic reasonings can get MichaelDBA> one into trouble, lol. We do some odd stuff with the statistics estimates for completely empty tables because (a) it's not common in practice for a table to be always empty (i.e. the emptiness is usually transient) and (b) if you take the emptiness of a table at face value, you end up generating insanely bad plans for certain FK check queries that may not get replanned quickly enough to mitigate the performance impact. -- Andrew (irc:RhodiumToad)
В списке pgsql-performance по дате отправления