(1) Install the pgstattuple extension (if not already installed): show search_path; <-- show current schema set search_path = ctlgadmin; <-- set schema in which to create extension CREATE EXTENSION IF NOT EXISTS pgstattuple; (2) To analyze a table for fragmentation, you can use the following command: SELECT * FROM pgstattuple('table_name'); This will return a set of statistics about the table, including the number of live and dead rows, the number of pages, and the amount of free space on each page. You can use this information to identify any fragmentation issues that may be impacting performance. (3) To analyze an index for fragmentation, you can use the following command: SELECT * FROM pgstatindex('index_name'); This will return a set of statistics about the index, including the number of pages, the number of distinct values, and the size of the index. You can use this information to identify ...