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