A client came to us wanting their admin panel rewritten. We asked to instrument it first. One moderation screen was running a full scan per row, and the "slow legacy system" was mostly that one query.
The rewrite budget turned into a week of work. We now do a short discovery before quoting any rewrite, because the guessing was the expensive part. You have probably seen rewrites that were really one query.