The PostgreSQL planner wasn't applying the spatial filtering of tile bounds to the queries efficiently.