Search Postgresql Archives

Re: empty table explain...

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

 



Luca Ferrari <fluca1978@xxxxxxxxxxx> writes:
> I'm curious to know why, if a table is empty, it seems that an ANALYZE
> of the table does not insert any stats in the pg_stats table,

Uh ... because there are no stats to insert.  The only available
information is that the table is empty, which is something we track in
pg_class not pg_stats.

> Second, if I execute an EXPLAIN 
> on an empty table, even after an ANALYZE of the table, I got an explain that 
> proposes me a row numbers and size that I cannot understand (since it seems to 
> be different depending on the table definition).

That's the planner not wanting to bet on an empty table staying empty.

			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