Kqr Row Cache Contention Check Gets [hot] Jun 2026

ALTER SYSTEM SET events '10704 trace name context forever, level 10';

Because the cache was empty, all 10,000 threads saw a at the exact same moment. They all rushed to the database.

A financial trading system ran 1000 concurrent sessions executing SELECT balance FROM accounts WHERE account_id = ? . Each statement was hard-parsed (no bind variables). The AWR report showed: kqr row cache contention check gets

Oracle’s row cache is divided into multiple (subcaches), each protected by its own row cache lock (a type of latch, not to be confused with enqueues). Key subcaches include:

CACHE GETS (total): 10,000 CACHE HITS: 0 CACHE MISSES: 10,000 MISSES WHILE LOCK HELD: 10,000 CONTENTION RATIO: 1.00 TOP CONTENDED ROW: item:42 WAITING THREADS: 9,999 LOCK HOLD TIME (avg): 487ms ALTER SYSTEM SET events '10704 trace name context

To understand contention, we must first understand the architecture. The Oracle Shared Pool is a memory area divided into several sub-components. The most famous is the (where SQL execution plans reside), but equally vital is the Data Dictionary Cache , often referred to as the Row Cache .

She’d seen this before. It wasn’t a database problem — it was a problem. Key subcaches include: CACHE GETS (total): 10,000 CACHE

Use v$rowcache_parent to see which specific objects are hot:

Understanding "kqr row cache contention: check gets" In Oracle Database performance tuning, is a specific wait event that indicates a bottleneck within the Row Cache (also known as the Data Dictionary Cache). To resolve this, it is essential to understand why the database is struggling to access metadata and how to streamline those requests. The Role of the Row Cache

But they didn’t just rush to the database — they collided at the . You see, KQR’s cache was protected by a single, global synchronized block for writes.

This was a contention storm . The first thread to acquire the cache lock went to the database (487ms). The other 9,999 threads didn’t just wait — they spun, retried, and choked the CPU.