From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Devrim GÜNDÜZ <devrim(at)gunduz(dot)org> |
Cc: | pgsql-docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: Doc patch for truncate.sgml |
Date: | 2008-08-28 17:30:14 |
Message-ID: | 48B6E0A6.7030201@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Devrim GÜNDÜZ wrote:
> Attached is a doc patch for truncate.sgml. It improves info for
> TRUNCATE. Thanks to Andrew Sullivan for pointing out this.
> --- 34,44 ----
> <command>DELETE</command> on each table, but since it does not actually
> scan the tables it is faster. Furthermore, it reclaims disk space
> immediately, rather than requiring a subsequent <command>VACUUM</command>
> ! operation. This is most useful on large tables. Also,
> ! <command>TRUNCATE</command> rewrites system catalogue entries for
> ! that table, which makes running <command>ANALYZE</command> on a
> ! freshly-truncated table is a bad idea, because the statistics will be
> ! updated to indicate that the table is truly empty.
> </para>
> </refsect1>
If the table is in fact empty, why is it a bad idea to let the
statistics reflect that? I think you are making assumptions about
certain usage patterns that do not always have to be true, and that are
not written down anyway.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-08-28 18:20:27 | Re: Doc patch for truncate.sgml |
Previous Message | Devrim GÜNDÜZ | 2008-08-28 15:14:47 | Doc patch for truncate.sgml |