For debugging slow queries, you can get the Postgres EXPLAIN execution plan of a query using the explain() method.