the [Postgres `explain` docs](https://www.postgresql.org/docs/current/using-explain.html) should have enough info to get started.