03 / 03

What is the impact of KEYS * in production and what's the alternative?

KEYS * blocks the event loop for the entire scan — catastrophic on large keyspaces. Use SCAN cursor COUNT hint MATCH pattern for non-blocking incremental iteration. For set membership patterns, use secondary index structures (sets per category) instead of key pattern scans.

Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.