# hypopg — Postgres extension

> Try an index without building it, to see if the planner would use it.

Source: https://scribase.com/extensions/hypopg

Category: Performance. Version: 1.4.3. Optional, enabled per project.

## About

HypoPG creates hypothetical indexes that exist only for the planner in your session. Run EXPLAIN (not EXPLAIN ANALYZE) and see whether the plan would use the index and how the cost changes, without the time, disk and locks of building it.

## Enable it

```sql
create extension if not exists hypopg with schema extensions;
```

## Example

```sql
select * from hypopg_create_index('create index on orders (customer_id)');

explain select * from orders where customer_id = 42;

select hypopg_reset();
```

Upstream: https://github.com/HypoPG/hypopg