Posts

Showing posts with the label 12c

Understanding Database Latency

Image
Latency is basically the amount of time you must wait to get a response from a request.   It is measured at a specific component like a storage or network device.   When you ask a computer to do something, each component involved in that request has a minimum amount of time it takes to reply with an answer even if the answer is a null value.   If your database requests a single block from storage, then the time it takes to receive that block is storage latency.   If the storage is attached over a network like Fibre Channel or SAS, then the network interfaces and cables each add their own latency. Latencies are often measured in milliseconds (ms).   There are 1,000 milliseconds per second, and most people cannot perceive anything smaller than 1 millisecond.   However, computers are wicked fast and the latency may need to be measured in microseconds (each μs is a millionth of a second) or even nanoseconds (each ns is a billionth of a second).   Hard dr...

Oracle Database Smart Flash Cache (DSFC)

The Oracle Database Smart Flash Cache solution, or simply DSFC, accelerates primarily OLTP workloads by caching frequently accessed blocks in a hybrid memory area that spans from the Oracle database buffer cache to one or more flash memory storage devices.  The feature is recommended for any Oracle database stored entirely on disk, which is well known for higher wait times and lower throughput than flash. This feature is only available on Oracle branded operating systems including Oracle Linux and Solaris.   It does not require the Oracle branded kernel known as UEK.   If you are not using an Oracle operating system, then consider moving specific tablespaces to a flash storage device. Physically, the DSFC is just a file.   The file can span one or more flash storage devices or partitions.   This spanning of devices is inherent to DSFC, which acts like software defined RAID 0.   You may use logical volume management or Oracle ASM disk groups to do the sa...

Oracle Client Result Cache

This post describes the Oracle Client Result Cache, which allows OCI clients to cache query results in local memory. This feature is also known as the Client Query Cache, Client Side Query Cache, and the OCI Consistent Client Cache.  The feature was first introduced in Oracle 11g. Earlier I talked about the Server Result Cache.  It can cache the resulting rowsets from queries and function calls in a central location to be reused by all clients.  Here, the Client Results Cache stores the resulting rowsets locally where they can be reused only by that client.  That's the down side.  On the up side, all sessions managed by the given client can access the cache. A benefit of the Client Results Cache over the Server Result Cache is it avoids network calls.  The data is cached locally.  When using the Server Result Cache the client must put in a call over the network and wait for the data to be returned over the network. The Client Result Cache is a mo...

Oracle Server Result Cache

This post is about the Oracle Server Result Cache, a free feature of Oracle Database Enterprise Edition.  It was first introduced in Oracle 11g.  There were minor changes over time and it basically works the same in Oracle 21c.  Oracle 21c added some tuning knobs including these three new init.ora parameters, two of which support caching results of queries against temporary objects: RESULT_CACHE_EXECUTION_THRESHOLD RESULT_CACHE_MAX_TEMP_SIZE RESULT_CACHE_MAX_TEMP_RESULT What is the Oracle Server Result Cache? The Oracle Server Result Cache allows you to cache the results of queries and PL/SQL function calls in database server memory so that future executions of an identical query or function can immediately obtain results from the cache instead of executing and fetching data to re-formulate the results.   Without this feature, Oracle caches the SQL execution plan so it knows how to fetch the data, and it caches some or all of the data, but your query must still a...