17 rows is not 17 rows

If you&#x27;ve ever worked with Postgres, chances are you&#x27;ve had to debug a slow SQL query. The EXPLAIN command is usually the first port of call: it prints out the query plan that the database engine is going to execute. Paired with ANALYZE , it runs the query and updates the statistics. It&#x27;s a powerful tool, but it&#x27;s easy to get lost in the output when the query is very complex.…