|
Strictly formally, it cannot be a bug because the documentation that we have (which isn't much) claims that engine-independent statistics are only updated by ANALYZE or by manual update of statistical tables.
Thus, even adjustments to statistics which are made upon ALTER or DROP TABLE are in fact an undocumented feature.
That said, it seems unlikely that users should cherish stale statistics of a truncated table, so probably, if deletion doesn't affect much TRUNCATE execution time, they shouldn't mind. Of course, a question can be raised why TRUNCATE t deletes statistics while DELETE FROM t doesn't, but since TRUNCATE differs from DELETE in many aspects, it won't be anything unique.
|