Edit on GitHub
Heroku PostgreSQL: Why Does the Connector Take a Long Time To Execute a Query?link
Questionlink
Why does it take longer for the connector to execute a query than natively running the query on the database?
Environmentlink
Connector: Heroku PostgreSQL
Answerlink
Make sure that the Heroku PostgreSQL plan uses the same region as the connector extracting data from the Heroku PostgreSQL database.
Causelink
This may happen because the Heroku database and the connector extracting data from the same database are in different regions.