Re: Bad Query Plans on 10.3 vs 9.6

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Bad Query Plans on 10.3 vs 9.6
Дата
Msg-id CAKJS1f84ufJ-GJSj=7QUaRiNDE58wLVD3GH_La_wdfNSaJLWtA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bad Query Plans on 10.3 vs 9.6  (Cory Tucker <cory.tucker@gmail.com>)
Ответы Re: Bad Query Plans on 10.3 vs 9.6
Список pgsql-general
'On 30 March 2018 at 03:21, Cory Tucker <cory.tucker@gmail.com> wrote:
>> Another possibility is that 10.3 sees the index-only scan as too expensive
>> because it thinks most of the table isn't all-visible.  Comparing
>> pg_class.relallvisible values might be informative.

> I'm happy to try to dig into this one more, however, I'm not familiar with
> this value.  What should I be looking for here?

Each table in your database has an entry in the pg_class table. Something like:

SELECT relallvisible from pg_class where oid = 'build.household'::regclass;

would show you the value, however, I think a problem here is unlikely
since that would just control the likelihood of an index-only-scan vs
an index-scan. You're getting a Seq-scan, which I imagine is going to
be quite a bit more expensive than even an index scan.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


В списке pgsql-general по дате отправления:

Предыдущее
От: Cory Tucker
Дата:
Сообщение: Re: Bad Query Plans on 10.3 vs 9.6
Следующее
От: Cory Tucker
Дата:
Сообщение: Re: Bad Query Plans on 10.3 vs 9.6