Skip to main content

Using True Cache in Oracle

Oracle True Cache is a read-only, consistent cache for Oracle Databases. It allows applications to read data from a cache instead of hitting the primary database every time, without sacrificing data accuracy.

Oracle True Cache is available starting with Oracle Database 23ai.

True Cache is useful when your application;

Has read-heavy workloads

Experiences high latency accessing the database

Needs to scale reads without scaling the primary database


How True Cache Works

When an application sends a query, Oracle first checks the True Cache to see if the requested data is already available and still valid. If the data is found in the cache, it is returned immediately, allowing the application to get results with much lower latency and without putting load on the primary database. If the data is not present in the cache, Oracle retrieves it from the primary database, returns it to the application, and stores a copy in the cache for future requests. Whenever the data changes in the primary database, Oracle automatically refreshes or invalidates the cached data to ensure that all subsequent reads remain consistent and accurate.


How to Enable Oracle True Cache

To enable Oracle True Cache, first ensure your primary Oracle Database supports the feature and identify read heavy data that would benefit from caching. 

Next, provision a separate Oracle Database to act as the True Cache and securely connect it to the primary database. 

Configure database services so that read-only queries are automatically routed to the cache while write operations continue to go to the primary database. 

Finally, point your application to the cache enabled service and monitor performance to fine tune cache usage.

Usually it ccan be implemented without needing any application code changes.


Below are some sqls you can use:

Use this to view parameters related to True Cache

SHOW PARAMETER cache;

SELECT name, value FROM v$parameter WHERE name LIKE '%cache%';


Monitor Cache Usage and Performance

SELECT * FROM v$sysstat WHERE name LIKE '%cache%';


As a summary , Oracle True Cache offers a simple way to scale read performance while maintaining data correctness. With minimal configuration and little to no application changes, it can significantly reduce database load and improve user experience.

Comments

Popular posts from this blog

Building Continuous Data Trust with Oracle GoldenGate Veridata 26c

Today I'll discus on how we can build continuous data trust with Oracle GoldenGate Veridata 26c! As we accelerate towards hybrid and multi cloud architectures , one challenge keep coming up. That is "H ow do you trust your data across all these platforms?" With increasing data movement, replication, and transformation, even small changes can lead to major business risks. This is where Oracle GoldenGate Veridata 26c comes in handy! Rather than just validating data occasionally, the focus now is on continuous data trust . What is Veridata? It is a tool to compare data across different systems. It ensures source and target databases are in sync. It works during , Data migration, Replication setups, Ongoing operations. What’s new in Veridata 26c? 1. Support for Modern Architectures Built for hybrid, multi-cloud, and lakehouse environments with support for heterogeneous databases. 2. Continuous Data Validation Enables ongoing validation to detect data drift and inconsisten...

Bring AI to Data , A Smarter Way with Oracle!

  “Bring AI to Data” is a term I recently heard during the Oracle AI World in Singapore last week and it really caught my attention. It sounded simple but the idea behind it is quite powerful. So I thought it’s worth exploring a bit more! Normally, working with data and AI meant one thing, which is, moving data around. We would extract data from databases, send it to external tools or platforms, build machine learning models and then push the results back into the database. But this approach adds complexity, increases costs and introduces security risks. But now, Oracle is changing that model by bringing AI to where the data already is ! The concept of “Bring AI to Data” is straightforward but powerful. Instead of moving large volumes of data across systems, Oracle allows you to run AI and machine learning directly inside the database. This means that data do not have to leave its secure environment. This results faster processing, reduced data duplication, improved security ...

Why Oracle Cloud Infrastructure is powering the Next Generation of Enterprise Innovation

Oracle Cloud Infrastructure (OCI) is a modern cloud platform designed to help businesses run their applications faster, safer, and at lower cost. It supports companies of all sizes in moving their workloads to the cloud with confidence. OCI is built for high performance. Its advanced architecture allows applications, databases, and workloads to run smoothly with low latency. This makes it suitable for business critical systems, data analytics, and enterprise applications. Security is a core feature of Oracle Cloud. Data is encrypted by default, and strong identity and access controls help protect systems from threats. OCI also meets global compliance standards, making it a trusted choice for regulated industries. Oracle Cloud works especially well with Oracle databases and applications, offering better performance and efficiency. At the same time, it supports open source tools and technologies, allowing organizations to use the platforms and frameworks they already know. Oracle Cloud...