|
289 | 289 | to meaningful statistical changes.
|
290 | 290 | </para>
|
291 | 291 |
|
| 292 | + <para> |
| 293 | + Tuples changed in partitions and inheritance children do not trigger |
| 294 | + analyze on the parent table. If the parent table is empty or rarely |
| 295 | + changed, it may never be processed by autovacuum, and the statistics for |
| 296 | + the inheritance tree as a whole won't be collected. It is necessary to |
| 297 | + run <command>ANALYZE</command> on the parent table manually in order to |
| 298 | + keep the statistics up to date. |
| 299 | + </para> |
| 300 | + |
292 | 301 | <para>
|
293 | 302 | As with vacuuming for space recovery, frequent updates of statistics
|
294 | 303 | are more useful for heavily-updated tables than for seldom-updated
|
|
345 | 354 | <command>ANALYZE</> commands on those tables on a suitable schedule.
|
346 | 355 | </para>
|
347 | 356 | </tip>
|
| 357 | + |
| 358 | + <tip> |
| 359 | + <para> |
| 360 | + The autovacuum daemon does not issue <command>ANALYZE</command> commands |
| 361 | + for partitioned tables. Inheritance parents will only be analyzed if the |
| 362 | + parent itself is changed - changes to child tables do not trigger |
| 363 | + autoanalyze on the parent table. If your queries require statistics on |
| 364 | + parent tables for proper planning, it is necessary to periodically run |
| 365 | + a manual <command>ANALYZE</command> on those tables to keep the statistics |
| 366 | + up to date. |
| 367 | + </para> |
| 368 | + </tip> |
| 369 | + |
348 | 370 | </sect2>
|
349 | 371 |
|
350 | 372 | <sect2 id="vacuum-for-visibility-map">
|
@@ -797,6 +819,13 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
|
797 | 819 | since the last <command>ANALYZE</command>.
|
798 | 820 | </para>
|
799 | 821 |
|
| 822 | + <para> |
| 823 | + Partitioned tables are not processed by autovacuum. Statistics |
| 824 | + should be collected by running a manual <command>ANALYZE</command> when it is |
| 825 | + first populated, and again whenever the distribution of data in its |
| 826 | + partitions changes significantly. |
| 827 | + </para> |
| 828 | + |
800 | 829 | <para>
|
801 | 830 | Temporary tables cannot be accessed by autovacuum. Therefore,
|
802 | 831 | appropriate vacuum and analyze operations should be performed via
|
|
0 commit comments