Re: Optimizer showing wrong rows in plan

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

 



Tadipathri Raghu <traghu.dba@xxxxxxxxx> writes:
> Frankly speaking its a newly created table without any operation on it as
> you have seen the example. Then how come it showing those many rows where we
> have only one in it.

Yes.  This is intentional: the size estimates for a never-yet-analyzed
table are *not* zero.  This is because people frequently create and load
up a table and then immediately query it without an explicit ANALYZE.
The quality of the plans you'd get at that point (especially for joins)
would be spectacularly bad if the default assumption were that the table
was very small.

			regards, tom lane

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

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux