Re: Index is not used for "IN (non-correlated subquery)"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Index is not used for "IN (non-correlated subquery)"
Дата
Msg-id 26446.1480614081@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Index is not used for "IN (non-correlated subquery)"  (George <pinkisntwell@gmail.com>)
Список pgsql-general
George <pinkisntwell@gmail.com> writes:
> On Thu, Dec 1, 2016 at 6:58 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What
>> do you get for
>> select * from pg_stats where tablename = 'wg3ppbm_userpartner';
>> and likewise for wg3ppbm_partner?

> It is a wide table. Do you want me to dump csv here?

Shouldn't be *that* wide, with only one row in the underlying table ;-)
Maybe psql \x format would be suitable.

> In the meantime, with the help of the folks at #postgresql I was able
> to wisen up the query planner by using either one of the following two
> settings:
>  SET enable_seqscan = false
>  SET cpu_tuple_cost = 0.1

Well, that proves it is considering the indexscan option.  But there is
something funny going on, if you have stats for these tables and yet
you're getting a default rowcount estimate.

            regards, tom lane


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

Предыдущее
От: George
Дата:
Сообщение: Re: Index is not used for "IN (non-correlated subquery)"
Следующее
От: Benoit Lobréau
Дата:
Сообщение: [GENERAL] Replication between différent versions of the same OS.