Would this index help?
simulate_indexSimulate an index's effect on a query plan without creating it, showing estimated costs and whether the planner would use it.
Instructions
Answers whether an index would change the plan for a given query — WITHOUT creating it. Uses the hypopg extension, which registers the index in backend memory only: the planner sees it, storage never does, and it is gone when the call returns. Give the query, the table and the columns; the index definition is assembled here, so there is no way to send DDL through this tool. Returns the plan and cost with and without, and whether the planner actually reached for it — a cost that barely moves and an index the planner ignored are different answers. These are planner ESTIMATES, not measured times: treat a big improvement as a reason to test the index, not as proof. Needs hypopg installed; says so plainly, with the package name, when it is missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | the read-only query the index is supposed to help | |
| table | Yes | the table to index, `schema.table` or just `table` (defaults to the `schema` field, then to public) | |
| using | No | access method | btree |
| schema | No | used only when `table` is unqualified | public |
| columns | Yes | column names, in index order | |
| database | No | which configured database to use; omit when only one is configured |