A Postgres view and a well-placed index beats half the data layer abstractions I see in production. If you are adding a caching layer before running EXPLAIN ANALYZE, you are guessing — and it usually shows.