問題文
An insurance portal runs heavy analytical queries that scan large date ranges. These queries slow down the customer-facing pages that share the same Heroku Postgres database. The architect wants the reports to stop competing with transactions without changing the reporting SQL. What should be recommended?
選択肢
- Add a follower of the primary database and point the reporting queries at it, because a follower is a continuously updated copy that serves reads.
- Raise the statement timeout on the primary so the long queries are cut off before they affect the pages, and the reporting job then retries each range until it fits inside the new limit.
- Create a fork of the primary database, schedule the fork to be recreated every night, and run the reports against whichever fork is most recent so that the reporting workload is always isolated from the primary.
- Move the reporting queries into a worker process type on the same database.