Can I create custom indexes on tables used with Heroku Connect?


You want to create custom database indexes on tables that are managed by Heroku Connect.


Heroku Connect offers the ability to add a simple index through a mapping's edit page in the Heroku Connect dashboard. While these are only simple indexes, they come with the additional benefit of being included when a connection's configuration is exported.

Connect will create indexes with a specific prefix and only manage that. Other indexes will not be touched.

If a different index is desired, you may add it directly using Postgres but it won't be included when you export your connection config and import it to other Connect instances. You will need to manually recreate it.

When adding custom indexes avoid using the prefixes hc_idx_ and hcu_idx_. Connect uses these names internally and may remove them automatically as mappings change.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support