Why does the connector take a long time to execute a query compared to running the query on the database?
Connector: Heroku Postgres
Make sure that the Heroku Postgres plan uses the same region as the connector that is extracting data from the Heroku Postgres database.
Here is a StackOverflow article that talks about the same.
This may be happening because the Heroku database and the connector that is extracting data from the same database are in different regions.