Search Postgresql Archives

Re: Nested Loop Left Join always shows rows=1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scara Maccai <m_lists@xxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux