Oracle 21c — Using Result Cache in Standby
Another new feature introduced in Oracle Database 21c is the ability to use the RESULT_CACHE hint in a Physical Standby environment. The following section explains how to use this feature. The execution time of the following query in the primary database is about one minute: –Primary: SQL > select count ( * ) from usef.tbl1; COUNT ( * ) ——— - 62775296 Elapsed: 00 : 01 : 06.45 SQL > / COUNT ( * ) ——— - 62775296 Elapsed: 00 : 01 : 03.61 By using the RESULT_CACHE hint, this time is reduced to less than one second! –Primary: SQL > select /*+ result_cache */ count ( * ) from usef.tbl1; COUNT ( * ) ——— - 62775296 Elapsed: 00 : 01 : 20.74 SQL > select /*+ result_cache */ count ( * ) from usef.tbl1; COUNT ( * ) ——— - 62775296 Elapsed: 00 : 00 : 00.00 Executing this query in the standby environment takes about 30 seconds (our standby database has better resources than the primary one!): –Physical Standby: –P...