PostgreSQL: How to index all foreign keys?
Posted
by biggusjimmus
on Stack Overflow
See other posts from Stack Overflow
or by biggusjimmus
Published on 2010-06-03T21:52:51Z
Indexed on
2010/06/03
21:54 UTC
Read the original article
Hit count: 229
I am working with a large PostgreSQL database, and I are trying to tune it to get more performance.
Our queries and updates seem to be doing a lot of lookups using foreign keys.
What I would like is a relatively simple way to add Indexes to all of our foreign keys without having to go through every table (~140) and doing it manually.
In researching this, I've come to find that there is no way to have Postgres do this for you automatically (like MySQL does), but I would be happy to hear otherwise there, too.
© Stack Overflow or respective owner