pg_seq_scan_tables
Identify tables with high sequential scan ratios to find missing index candidates. Focus on tables where queries read entire rows instead of using indexes, reducing query performance.
Instructions
Tables with high sequential-scan counts relative to index scans - the first place to look for missing-index candidates. Returns seq_scans, idx_scans, live tuples, and the ratio. A high ratio on a large table usually means a query is reading the whole table where an index would suffice. Pair with pg_top_queries to find which query is doing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return (default 20). | |
| schema | No | Limit to one schema. If omitted, all user schemas are included. | |
| minSize | No | Minimum live tuple count to include (default 1000, filters out tiny/empty tables). |