| Goal | This query generates a list of all base tables where the FILLFACTOR has been explicitly set to a value other than the default of 100. This non-default setting is a deliberate performance tuning decision, intended to reserve free space within table pages to improve the efficiency of UPDATE operations by facilitating HOT updates. The query provides a comprehensive list for administrators to audit these customizations and verify that they are still necessary and appropriate for the current table workload. |
|---|---|
| Notes | The query's logic correctly accounts for how PostgreSQL stores relation options (reloptions). A simple check like reloptions IS NOT NULL is insufficient because this array can contain other settings, or it might explicitly store FILLFACTOR=100 if the value was changed and then reverted. Therefore, to avoid false positives, the query does not just check for the presence of options; it specifically parses the reloptions array to isolate entries where FILLFACTOR is defined as a value other than the default of 100. |
| Type | General (Overview of some aspect of the database.) |
| License | MIT (opens in new tab) |
| Data Source | INFORMATION_SCHEMA+system catalog |
| SQL Query |
|
Collections
This query belongs to the following collections:
Find problems by overview
Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not .
| Name | Description |
|---|---|
| Find problems by overview | Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not . |
Categories
This query is classified under the following categories:
Data at the database physical level
Queries of this category provide information about the disk usage.
Performance
Queries of this category provide information about indexes in a database.
| Name | Description |
|---|---|
| Data at the database physical level | Queries of this category provide information about the disk usage. |
| Performance | Queries of this category provide information about indexes in a database. |
Further reading and related materials: