Everything I knew to do here, I learned from this pluralsight course:https://app.pluralsight.com/library/courses/postgresql-playbook/table-of-contents and this blog post: http://www.craigkerstiens.com/2012/10/01/understanding-postgres-performance/
I used cg run -e <env> bash
and then psql $DATABASE_URL
to connect to the DB
I used the postgres query here to find big tables with low rates of using indexes, see “Understanding Index Usage” : http://www.craigkerstiens.com/2012/10/01/understanding-postgres-performance/
googledrivelti=> SELECT
googledrivelti-> relname,
googledrivelti-> 100 * idx_scan / (seq_scan + idx_scan) percent_of_times_index_used,