Re: Nested Loop Left Join always shows rows=1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Nested Loop Left Join always shows rows=1
Дата
Msg-id 11492.1227822563@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Nested Loop Left Join always shows rows=1  (Scara Maccai <m_lists@yahoo.it>)
Ответы Re: Nested Loop Left Join always shows rows=1  (Scara Maccai <m_lists@yahoo.it>)
Список pgsql-general
Scara Maccai <m_lists@yahoo.it> writes:
>   Aggregate  (cost=31.91..31.92 rows=1 width=4) (actual
> time=14.185..14.185 rows=1 loops=1)
>     ->  Nested Loop Left Join  (cost=0.00..17.11 rows=2959 width=4)
> (actual time=8.608..13.400 rows=2953 loops=1)
>           ->  Index Scan using id_idx on tab1  (cost=0.00..8.27 rows=1
> width=4) (actual time=0.010..0.011 rows=1 loops=1)
>                 Index Cond: (id = 10)
>           ->  Index Scan using out_id_idx on tab_outer  (cost=0.00..8.83
> rows=1 width=8) (actual time=8.590..11.924 rows=2953 loops=1)
>                 Index Cond: ((tab_outer.out_id = 10) AND (tab1.id =
> tab_outer.out_id))

This seems a bit broken :-( ... ideally it shouldn't be generating the
redundant index condition, either.  I think the redundant condition is
probably indirectly responsible for the low rowcount estimate, too.
It doesn't really hurt anything, since the join output estimate is
correct, but it'd be nice to make it look better.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Expected password response, got message type 88
Следующее
От: Bill Todd
Дата:
Сообщение: Re: COPY with a variable path