All Questions
Caching medium

An analytics job performs a full table scan, reading every row in the DB once. Why is a standard LRU cache policy bad for this workload?

  1. A It causes 'Cache Pollution': The one-time-use items flood the cache, evicting the frequently accessed 'hot' data that the application relies on.
  2. B LRU is an O(N) complexity algorithm and the linear scan overhead becomes too computationally expensive for the primary CPU thread.
  3. C The full table scan generates massive write locks at the database layer that prevent the cache from performing its background refresh operations.
  4. D Standard LRU policies are strictly optimized for write-heavy workloads and will fail to accurately track the recency of read-only scan operations.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions