How to determine what type of index to use in Postgres?

前端 未结 2 1736
长发绾君心
长发绾君心 2021-02-05 03:09

I have a Postgres database that has 2 columns that are not primary keys (nor can be), but are searched on a lot and are compared for equality to 2 columns in other tables.

2条回答
  •  醉酒成梦
    2021-02-05 03:17

    Try to understand the queryplanner as well, because this part of PostgreSQL has to work with your indexes. EXPLAIN ANALYZE will be essential to optimise your queries.

提交回复
热议问题