Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
AND
ANDQueries of this category provide information about the disk usage.
ANDFrom where does the query gets its information?
AND
AND

There are 22 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
1All system-defined TOAST-able typesFind system-defined types in case of which the system can use the TOAST technique, i.e., save the value in a compressed form or store it in a automatically-created secondary table, which is hidden from the database user (TOAST table).Generalsystem catalog base tables only2020-11-06 14:51MIT License
2All user-defined TOAST-able typesFind user-defined types in case of which the system can use the TOAST technique, i.e., save the value in a compressed form or store it in a automatically-created secondary table, which is hidden from the database user (TOAST table).Generalsystem catalog base tables only2020-11-06 14:51MIT License
3Base table columns where TOASTing is possibleFind all base table columns in case of which the system can use TOAST technique.Generalsystem catalog base tables only2020-11-06 14:51MIT License
4Base table columns where TOAST-ing strategy has been changedFind base table columns in case of which the system can use TOAST technique (due to the data type of the column) and where the toasting strategy has been changed so that it is different than the default strategy determined by the type. Make sure that the new strategy is optimal.Generalsystem catalog base tables only2020-11-06 14:51MIT License
5Base table columns where TOAST-ing strategy has been changed to plainFind base table columns in case of which the system can use TOAST technique (due to the data type of the column) and where the toasting strategy has been changed to plain. It means that potentially, if a value in the column is large enough, it is not possible to save the row.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
6Base table FILLFACTOR is not 100Find all base tables where FILLFACTOR is not 100, i.e., the default value.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
7Base tables that do not have a TOAST tableFind base tables that (due to the types of their columns) do not have an associated TOAST table for storing out-of-line data.Generalsystem catalog base tables only2020-11-06 14:51MIT License
8FILLFACTOR is probably too bigFind base tables in case of which the FILLFACTOR property has perhaps a too big value. Try to find base tables that probably encounter UPDATE operations. In the tables that have frequent updates you want to have free space in table pages (blocks) to accommodate new row versions, which the system automatically creates as a result of fulfilling UPDATE statements. If a new row version will be put to another page by the system, then it means that table indexes have to be updated as well. Thus, the more there are indexes, the more the table would benefit from keeping a new row version in the same page as the old version.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-17 00:22MIT License
9FILLFACTOR is probably too smallToo small fillfactor wastes storage space.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-02 10:43MIT License
10Index FILLFACTOR has been changedFind all indexes where FILLFACTOR is not the default. The default is different in case of different index types is different. In case of B-tree indexes the default is 90.Generalsystem catalog base tables only2022-11-02 10:58MIT License
11Minimum tuple length required before trying to move long column values into TOAST tables has been changedFind base tables in case of which toast_tuple_target storage parameter value is not the default value (2040). "Changing this value may not be useful for very short or very long rows. Note that the default setting is often close to optimal, and it is possible that setting this parameter could have negative effects in some cases. " Make sure that the parameter has an optimal value.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
12Percentage of the total index storage size from the total database storage size (system catalog included)Get overview of disk usage.Sofware measuresystem catalog base tables only2020-11-06 14:51MIT License
13The size of base tables and their indexesFind the size of base tables without indexes, size of the indexes of the table, total size of the table (including its indexes) and percentage of the index size from the total size. If the size of indexes of a table is relatively high, then check as to whether all the indexes are needed.Generalsystem catalog base tables only2023-10-27 20:38MIT License
14The storage size of each index (the system catalog excluded)Get overview of disk usage.Sofware measuresystem catalog base tables only2020-11-06 14:51MIT License
15The storage size of each schema data object (the system catalog excluded)Get overview of disk usage by different schema objects that contain user data.Sofware measuresystem catalog base tables only2020-11-06 14:51MIT License
16The storage size of each table (including indexes) (the system catalog excluded)Get overview of disk usage.Sofware measuresystem catalog base tables only2020-11-06 14:51MIT License
17The total size of all indexes (system catalog excluded)Sofware measuresystem catalog base tables only2023-05-14 11:04MIT License
18The total size of all tables (system catalog excluded)Sofware measuresystem catalog base tables only2023-05-14 11:04MIT License
19The total storage size of all indexes (the system catalog excluded)Get overview of disk usage.Sofware measuresystem catalog base tables only2020-11-06 14:51MIT License
20The total storage size of the database (the system catalog included)Get overview of disk usage.Sofware measuresystem catalog base tables only2020-11-06 14:51MIT License