Implementing Oracle Partitioning

This article gives a structured approach to implementing data partitioning using Oracle AI Database. Following a set of simple rules makes the job much easier. While Oracle partitioning is most often associated with Analytic or Data Warehouse applications, it’s best to let the application characteristics guide you rather than putting too much stock in simple labels like DW or OLTP. The approach outlined here can be used with Oracle Databases deployed on commodity infrastructure, on commodity clouds, with Exadata, or even with Oracle Autonomous Database. I always follow a set of discovery questions to learn more about the application to determine the best approach to partitioning data.

Partitioning & Parallelism

Oracle Partitioning and parallelism are independent. Partitioning is used for data management and data subsetting during querying. Parallelism is entirely independent and is not effected by how the data is partitioned. Oracle parallelizes queries that range over the entire set of qualifying partitions. I mention this because some other databases tie partitioning and parallelism together, further complicating the task of partitioning data.

Partitioning & Data Distribution

Distribution of data is critical to leveraging hardware performance. It’s possible to provision storage that distributes data according to the partitioning scheme. This practice is not recommended because I/O has to be serviced by a smaller portion of the overall storage, thereby reducing performance. Exadata also includes CPU in storage that processes queries using Storage Offload processing, so an even data distribution is critical to processing.

Exadata (on-premises) includes specialized storage models (such as XT or “extended” storage) that is useful for archival data. Partitioning is useful for populating that storage with archival data as part of an ILM (Information Lifecycle Management) strategy (more on this topic later in this article). Some other databases tie together parallelism and data distribution, further complicating the task of partitioning data.

The purpose of partitioning in Oracle

The purpose of data partitioning in Oracle is for:

  • Data Management
  • Faster querying

Data management involves loading, compression, Information Lifecycle Management (ILM) and purging data. Query performance is enhanced by filtering (subsetting) so that less data needs to be processed to reach the same answer.

What is the most voluminous data?

Oracle is a converged database that handles just about any type of data. You don’t need to worry about ALL of the data in your database, so just focus on what takes the most amount of space. Is that data held in a JSON structure, is it images you’re concerned about, or relational tables with rows and columns taking the most amount of space? I have seen extremely large Oracle Databases (hundreds of Terabytes) with just about every use-case under the sun. Partitioning is an important tool in the bag of tricks for dealing with large data volumes. I’ve seen healthcare data had simply accumulated over years and years because they keep it forever. Another case involved cell phone tower metrics that was only useful for about 2 years (used for determining tower placement). In short, learn something about the data and what it’s used for.

How does that data arrive?

Once you know more about the data you’re dealing with, the next consideration is how the data arrives to the database. Does the data arrive in bulk such as through a batch feed, or do you have individual users inputing data? For Analytic or Data Warehouse databases, the data might arrive in the form of an ETL (Extract Transform and Load) type file, fed from an OLTP system or from an ODS (Operational Data Store). I have seen databases the customer called a “Data Warehouse”, but it was really just a large-scale OLTP system with users entering data manually. The data in that case involved genetic characteristics of an organism they were tracking (I can’t say more due to confidentiality concerns). Another one involved photographs that were uploaded by individual users. Yet another involved data fed from external vendors, with the entire set of data for each vendor getting replaced each time.

How often does bulk data arrive?

The frequency of arrival is sometimes extremely important. How often the data arrive (in bulk) is especially important of it needs to be processed quickly. If the data arrives in bulk and loaded into the database, it can be processed in advance and readied for promotion into the database and made available to users. This can affect decisions about how to partition the data, but also how to index those partitions. I’ve seen data that arrived every few minutes, while in other cases the data might arrive once per week, once per month, or even annually.

How fast does bulk data need to be processed?

Oracle Partitioning can play an important role in making data available to users quickly, especially if the data arrives in bulk and loaded into the database (such as by ETL processing). The combination of how the data arrives, how often it arrives, and speed with which it needs to be processed can determine whether partition exchange loading is feasible or not. Decisions in this area may also affect how the data gets indexed. It has gotten more common that data needs to be processed rather quickly, but it’s even more common that users can’t be interrupted while data is being loaded.

What about data retention?

For large volume data, you need to know the data retention requirements. Some data effectively gets retained forever (like healthcare data), whereas other data needs to be purged or deleted from the database due to space consumption, or due to some data retention limits. It’s important to understand the data retention requirements so you can understand if it’s important to optimize for data purge, or if that simply isn’t going to matter.

Does the data get updated?

If the data being partitioned never gets updated, that opens up some interesting possibilities. The most highly effective data compression approach (Columnar Compression) doesn’t lend itself to updates, so you don’t want to assume Columnar Compression can be used if it’s not appropriate.

How does the data get queried?

In some cases, users are simply looking for a single row of data by a key value. However, in other cases, users are analyzing large volumes of data looking for patterns. How data gets queried is the primary factor used to determine:

  • Partition
  • Sub-Partition
  • Sharding
  • Local vs. Global Indexes

These factors should also be evaluated in light of how data arrives into the system, data retention rules, and how data is purged. If the data is always queried by date ranges, it might make sense to organized and partition by date ranges as well. You might also have data queried by something like a “region” key or other value, which might provide your sub-partition key. You can also consider Sharding (Oracle Globally Distributed Database) to be part of the partitioning scheme, which therefore gives a 3rd level of partitioning. Finally, it’s important to understand if local or global indexes will be needed. It’s helpful to think of the partitioning scheme as a coarse index, while indexes are more granular.

Oracle Partition Advisor

The partition Advisor is an integrated part of the SQL Access Advisor feature in Oracle Tuning Pack. It analyzes an actual query workload and provides optimal partitioning recommendations for existing unpartitioned base tables, as well as recommendations for partitioned indexes and materialized views. The Partition Advisor is useful when you have a running application with active SQL queries and you are evaluating whether (and how) to add partitioning to the database. The Partition Advisor doesn’t help if you are in the design phase for the application when you don’t necessarily have SQL that can run.

Indexing Partitioned Data

The 2 major types of indexes available for partitioned tables are GLOBAL versus LOCAL indexes. The partition scheme itself can be thought of as a coarse index. Local indexes cover individual partitions or sub-partitions, whereas GLOBAL indexes cover the entire table and span partitions. If your SQL query predicates identify specific partitions that need to be accessed first, a local index then helps find the rows you need to access. However, if your SQL doesn’t include WHERE clause predicates used for partition elimination, you’ll need a global index.

What backup solution?

Partitioning can be used to alleviate strains on your backup solution. If partitions can be marked read-only, those partitions only need to be backed up once. In some cases, the volume of data and backup/recovery performance needs can dictate how data is partitioned. That can be a problem if other factors such query performance dictate a different partitioning scheme.

ZDLRA (on-premises) or ZRCV (for Cloud) only ingest changes to data, so marking data read-only isn’t necessary for backup/recovery optimization.

What compliance needs?

Marking data read-only is often done for compliance reasons. If using ZDLRA/ZRCV for backups, the read-only feature can be devoted to compliance.

What platform?

The target platform can bring some other capabilities that can affect partitioning decisions. For example the following platforms enable use of Hybrid Columnar Compression:

  • Exadata
  • Oracle Database Appliance
  • Exadata Cloud
  • Oracle Database @Hyperscaler
  • Oracle Autonomous Database
  • Oracle Exadata Exascale

All of the above platforms work with Oracle Hybrid Columnar Compression, opening up the full range of data compression capabilities. The first two are available on any platform running Oracle Database, while the HCC algorithms only work on the platforms above.

  • Basic Compression
  • Advanced Compression
  • HCC – Query High
  • HCC – Query Low
  • HCC – Archive High
  • HCC – Archive Low

Advanced Compression is an extra-cost Oracle database option that generally pays for itself in storage savings.

Using Exadata Extended (XT) Storage and ILM

Exadata Extended (XT) Storage is designed to hold archival data. It’s a less expensive form of Exadata storage that provides lower performance. XT Storage is ideal for archival data that is infrequently accessed. Oracle Partitioning is an ideal way of populating XT storage such as by moving older partitions to ASM Disk Groups (or Exascale Pools). This is also known as an Information Lifecycle Management (ILM) strategy, and Oracle Partitioning is designed to facilitate ILM.

Summary

This article covers the approach I use to implement Oracle Partitioning. I first started doing manual partitioning in Oracle7 back in 1994, then started using the Partitioning feature when it was introduced in Oracle8 in 1997. Partition is something I have used with large scale databases ever since.

I always start with a set of discovery questions so I can learn something about the application, the business, and how the data will be used. Those answers guide me in making decisions about which tables need to be partitioned, how the partitioning scheme should be implemented, what sort of indexes are needed, and how the data can be compressed.

AI Comes to Exadata Sizing

The dramatically increased data volume we use for database system sizing has enabled us to use Artificial Intelligence to further improve the process. We previously relied on just a few data points for each database, but now we collect thousands! Read on to learn how we are integrating AI into the process of sizing Exadata for on-premises and Cloud.

Data Explosion

We injected an explosion of data into the sizing process starting in 2019, removing guesswork from the sizing process by making it much more data-driven. Rather than relying on “rule of thumb” approaches, we let the data show us the way forward. We now collect thousands of datapoints for each database and correlate those datapoints across databases to enable virtually ANY consolidation scheme users can imagine.

Oracle Cloud Capacity Analytics

We developed a tool called Oracle Cloud Capacity Analytics (OCCA) that is used internally to size systems for running Oracle Databases. The majority of the databases we size are moving to Oracle Cloud or one of the multi-cloud targets we support, but we also see a stead-stream of databases moving to Exadata on-premises. The OCCA tool gives estimates for the amount of system capacity required to run a set of databases. OCCA relies on data analytics to determine system size required to run those databases now and projecting into the future. The entire process is even more analytical and mathematical than ever before.

We use data science and analytics to size systems that will handle your databases in both Cloud and on-premises. We have also implemented Artificial Intelligence in strategic ways to make the process more effective than ever before.

AI Context Engineering

Our sizing tool begins with careful AI context engineering to ensure the AI is providing accurate answers to questions our users ask, but it also ensures the AI only provides answers in the area of expertise it’s trained on. If you ask the AI questions about things it doesn’t know about, the AI will tell you. For example, here’s what happens when a user asks OCCA why the sky is blue…

Carefully engineering the context the AI works within allows us to focus on training the AI for specific areas of expertise, increasing the quality of answers it gives to users. Context engineering also ensures the AI won’t even try to answer questions it knows nothing about, so we don’t have to worry about it telling users how to rule the world or otherwise do things the AI simply doesn’t handle. The AI we use has great information about sizing such as the definition of a cohort…

The AI we’re using (called “Ask OCCA”) is trained on the OCCA User’s Guide and related content to ensure it gives quality answers that are relevant to our users. It’s interesting that the AI will explain concepts from a different perspective than our technical writers might take on the same topic. Explaining the same topic from a different angle can help users understand the topic even better than before.

AI for Automating Cohorts

Databases are grouped together for consolidation, which saves system resources and reduces labor costs for managing databases. We call these groups of databases “cohorts” because there wasn’t a universally accepted term for this. In short, cohorts are groups of databases that can be consolidated together. The opposite of consolidation is isolation, and it’s important to consider these two ends of the spectrum. Cohorts capture the following:

  • Location of databases
  • Administrative Isolation
  • Security Isolation
  • Blast Radius

Most customers have databases in at least 2 locations such as production and disaster recovery locations. Many cloud vendors also have regions and availability domains for an additional layer of isolation by location, and that scheme is becoming more common in on-premises data centers. Administrative isolation is nearly ubiquitous because most organizations prefer to isolate production from development and test systems. Financial services, banking, and government customers often have specially isolated systems for security purposes, sometimes including multiple separate (and secure) networks. It’s the digital equivalent of security gate, security desk, and locks at each floor of a high rise building. It’s also common for customers to isolate databases from each other to reduce the impact of a failure or what is known as the “blast radius” of a failure.

There are sometimes markers in the data that we collect that suggests what cohort assignments should be. Customers use a wide variety of schemes for organizing their databases including some of the attributes shown below:

  • Database naming conventions
  • Server naming conventions
  • Cluster names
  • Exadata Database Machines used for consolidation
  • Enterprise Manager attributes (cost center, department, lifecycle status, line of business, location)

Artificial Intelligence is an ideal technology to determine what scheme a customer might be using, making cohort assignments much easier to divine from the data. The relationships between Primary and Standby databases can also give us clues about what the cohorts should be, or at least which databases can reside in each cohort. We are looking to AI to help us understand a population of databases and how they should be grouped together before we ask customers how they want to organize their databases. The opposite approach is to simply isolate everything onto dedicated Virtual Machines, but the cost and operational advantages of database consolation are too great to ignore.

AI-Driven Sizing Report Comparisons

Each target platform (Exadata on-premises, Exadata Cloud@Customer, Autonomous Database, etc.) has multiple options, versions, and other settings that affect sizing output. Thousands of data points are ingested for each sizing, and each platform has different characteristics that affect the capacity required to handle the workload. These factors make report comparison extremely complex, so we turned to Artificial Intelligence to make these comparisons useful. AI is able to evaluate the various factors that make one report different from another, allowing us to build a comparison tool that users find helpful.

AI-Driven Gap Handling (AI Code Assist)

Handling gaps in data is a great example of how AI Code Assist has helped us make our data-driven sizing even more effective. Gaps in data occur simply because Oracle Enterprise Manager (OEM) deployments are operational systems used. OEM is used for keeping databases running and helping administrators care for those databases on a day-to-day or even minute-by-minute basis. OEM captures performance metrics for the purpose of viewing and addressing performance problems. However, we use that information for a dramatically different purpose, which is capacity planning and sizing. We often find gaps in the data or “missing metrics” because some databases might be down, might be undergoing an upgrade, or whatever operational state the database could be in when the metrics are extracted.

These missing metrics or data gaps occur in the most recent, most fine-grained data, but we can sometimes use other metrics from prior periods to fill those gaps. The code required to fill these gaps is extremely complex, examining over 10’s or 100’s of thousands of rows with many attributes per row and more than a year of historical metrics for each database. We used AI Code Assist technology to develop the algorithms needed to fill these gaps in the collected metrics. This allowed our relatively small team of developers to deploy the necessary code that is used by hundreds of engineers to build sizing estimates for thousands of customers.

Conclusion

This article should give you a good idea of how we are putting AI to work in the area of Exadata sizing. Whether you are moving to Cloud or deploying Exadata on-premises, AI is helping us do an even more effective job of sizing systems to meet your needs using the inputs and guidance you provide.

Exadata Patching

This article covers Exadata Patching for on-premises Exadata systems (non-Cloud) or what is also known as software maintenance.

Oracle Platinum Services

Oracle will patch Exadata systems if you are unable to do it yourself. The platinum services team has done a great job tailoring the service to meet the ever-expanding capabilities of Exadata and resulting needs of customers. However, there are cases where customers need more flexibility than Platinum Services can provide, so some customers do Exadata patching themselves or contract for Oracle or 3rd party services to provide that flexibility. Be sure to review the Platinum Services Data Sheet (here), review the Scope of Services (linked from the Data Sheet) and talk to your Oracle Sales Representative to see if Platinum Services is right for you.

Advantages of Exadata in the Cloud

Exadata in the Cloud includes Cloud@Customer, OCI (Oracle Cloud Infrastructure), and Exadata multi-cloud (@AWS, @Azure, and @GCP). While this article covers on-premises Exadata systems, it’s important to note that Exadata in the Cloud offers some distinct advantages when it comes to patching. Some of the complexity outlined in this article is addressed in the Cloud by…

  • Standardization
  • Oracle Cloud Operations (division of labor)
  • Automated Tools

As you will see in this article, patching Exadata includes a great deal of flexibility in how it’s implemented. Oracle Cloud addresses this by first standardizing on the most common approaches which are then automated via the Cloud Control Plane software. This standardized framework is then evolved to include additional options needed by customers. Oracle Cloud includes a division of labor and responsibilities, assigning some of those responsibilities to Oracle Cloud Operations. All hardware maintenance is the responsibility of Oracle Cloud Operations, as well as the lower layers of the Exadata System Software stack (including the Hypervisor). The upper layers (Virtual Machine, GI, and Database software) are the responsibility of the customer, but automated tools are provided to simplify these tasks.

Frequency of Patching

Oracle allows customers to patch Exadata systems according to the frequency that best meets their business needs. In general, any of the following

  • Yearly
  • Quarterly
  • Monthly

Oracle recommends patching Exadata systems at least yearly, while the majority of Oracle customers patch Exadata systems on a quarterly basis. Heightened security concerns (due to the rise of Artificial Intelligence) are pushing more customers toward monthly patching, especially for applying security patches. Few customers patch Exadata systems on a monthly basis due to challenges with reboots and business impact (even with rolling patching). See the “Live Update” section of this article for more information.

Patch Bundles

Oracle provides patch bundles for all layers of the Exadata infrastructure, from O/S and drivers through database software. These bundles are separated into 5 areas as follows:

  • Exadata Database Servers (Bare Metal and Virtual Machines)
  • Exadata Storage Servers
  • Exadata network switches (InfiniBand or RoCE)
  • Oracle Grid Infrastructure
  • Oracle Database software (binaries & data patch)

The first three on the list above involving patching Exadata components and including drivers, O/S, and Exadata specific software. The included drivers are only those drivers necessary for Exadata systems. Exadata runs a distribution of Oracle Linux with a specialized kernel and minimal set of Linux packages needed for running Oracle Database. Compatibility of Exadata Release with GI and Database software are documented in MOS note KB153930.

Quarterly Full Stack Download Patch (QFSDP)

Oracle combines all patches into a single patch bundle known as the Quarterly Full Stack Download Patch (QFSDP) for the most common combination of versions. The advantage of QFSDP is it simplifies the task of evaluating software version dependencies, since all of those dependencies are built into the QFSDP. However, there might be additional combinations of software versions that ARE compatible beyond what is included in QFSDP. You get a bit more flexibility by not using QFSDP, but at the expense of a bit more work evaluating all of the combinations and permutations of software versions (outlined in MOS note KB153930).

Exadata Software Versions & Releases

All Exadata systems should be patched according to an established schedule as outlined above. It is important to stay current on Exadata software for the most stable and secure system possible, regardless of the hardware age. Exadata System Software includes the following levels:

  • Major Version
  • Release
  • Maintenance Release

Changes in Major Version involve changing the Oracle Linux version, which will sometimes involve more extensive changes. For example, the reserved UID/GID (User ID and Group ID) ranges changed in Oracle Linux 8, which sometimes forced changes to customer systems. Likewise, more extensive changes are expected when moving to Oracle Linux 9 (in Exadata System Software 26.2). One change that can affect customers is the minimum length of SSH keys to deliver greater security in Linux 9.

Recommended Exadata Releases

Oracle documents recommended releases in KB153930, and it is not always the latest release. Customers should use the RECOMMENDED release unless there is a feature or hardware compatibility requirement that dictates a later release than what is documented as recommended. Oracle performs extensive certification testing of each software release and hardware generation to ensure quality of the release. The recommended release will change as experience is gained in the field on real-world customer systems.

Current vs. Target Release

The amount of work required during the patching process is at least partially dependent on the current vs. target release. Waiting too long between patching events will often increase the amount of effort involved. Systems need to be at the minimum release level to upgrade directly to certain target releases. If the patching involves a change in Major Version (Linux version change), additional work is often required.

Exadata Database Server: Rolling vs. Non-Rolling Patching

The “state of the art” method for Exadata maintenance is to use rolling (or RAC rolling) patching, where each Database Server gets shutdown individually. RAC (Real Application Clusters) keeps the database running and accessible while nodes are being rebooted. Transparent Application Continuity (TAC) allows connections to move between nodes so users are not impacted. However, some applications don’t support RAC rolling updates.

Be aware that rolling patching of Database Servers will reduce the aggregate CPU, Memory, and I/O bandwidth when each Database Server goes down. Connections should be moved over to a node that’s running if the application is properly configured to use TAC. However, the aggregate capacity will be reduced and won’t be available to run workloads.

Exadata Storage: Rolling vs. Non-Rolling Patching

As with Database Servers, the “state of the art” for Exadata Storage Servers is to perform rolling updates. However, Exadata storage needs to be configured in High Redundancy to use rolling updates. Be aware that rolling patching of Exadata Storage Servers will reduce the aggregate XRMEM and Flash Cache available when each Storage Server is brought down. Exadata software (as of 26.1) pre-populates Flash Cache on partner Storage Servers to avoid a Flash Cache miss during patching. However, the aggregate Flash Cache is still being reduced during the patching process.

Exadata Switches – Always Rolling Patching

The internal switch fabric of Exadata (InfiniBand for older Exadata models, and RoCE in newer Exadata models) is designed to always be patched in a rolling fashion. The network fabric is fully redundant, with multiple network connections for each Database Server, multiple network connections for each Storage Server, and redundant switches as well.

Exadata Documentation

Each generation of the Exadata Documentation is cumulative, so the latest version includes instructions that apply to earlier versions.

MOS Articles

My Oracle Support (MOS) includes Knowledge Base articles that are critical to Exadata patching. Those notes are updated at least monthly, so be sure to review the latest version prior to any Exadata patching. The key KB articles are these:

  • KB153930 – Exadata Database Machine and Exadata Storage Server Supported Versions
  • KB467937 – Exadata System Software Certification

KB153930 detailed which versions of the various software stack layers are compatible with each other, while KB467937 details which Exadata Software versions have been certified with which Exadata Hardware generations.

Patch Readme Files

Each set of Exadata patches include readme files. These contain details of what is being applied in the update/patch, but may also contain other important information. It’s highly important to review any of the readme files within each download.

Exadata Configuration Check Utility (exachk)

Your Exadata system should generally be in a “healthy” state before you start patching. All Exadata systems should be configured to run the Exadata Configuration Checker (exachk) on a regular basis. The exachk tool will check the health of the system. Oracle periodically updates exachk to include new checks when issues are discovered, so exachk itself should be updated periodically to ensure your system has the latest checks included.

Local Customizations

You should avoid customizing your Exadata system as much as possible. That includes adding software that isn’t explicitly necessary for operating the system. Some 3rd party software or local customizations can stall the upgrade/patching process. If you can’t avoid installing 3rd party software, it’s best to install software in the form of RPM packages because software installed as packages are tracked by Linux in a standard manner. It is possible to customize the system in such a manner that will cause patching to fail. Customers have “root” (super user) authority on Exadata, and that level of access can be used to make changes that cause failures. When Oracle development becomes aware of these issues, checks are added to the exachk utility to detect those problems prior to patching. However, it is not possible to check every possible local customization that will impact patching.

Handling 3rd Party Packages

Oracle introduced features in the 25.1 release that provide much better handling of 3rd party packages. The Exadata software installer (patchmgr) is able to check dependencies among software packages to determine if 3rd party packages need to be upgraded in conjunction with a given Exadata software update. The traditional solution was to de-install the 3rd party software prior to the Exadata software update, then re-install the 3rd party software when Exadata patching is complete. That process is rather inconvenient and it’s undesirable in some cases (especially with security software).

Exadata Live Update

Starting with Exadata System Software 24.1, Oracle provides the Live Update feature which is designed to avoid reboot (keeping the system “live”) when critical updates and especially security updates (CVEs) are applied. Live Update is designed to be deployed as follows:

  • Quarterly Full Patching
  • Monthly Live Updates for CVEs

The most common Exadata patching interval used by customers is quarterly full patching (QFSDP or not). The vast majority of customers say that more frequent patching would be a burden and isn’t necessarily feasible. The amount of work would be a burden, and coordination with the business and application teams would make that difficult. Oracle designed the Live Update feature to allow customers to apply critical fixes and security updates (CVEs) without a system reboot. For more information about Exadata Live Update, see here.

Exadata Hardware Lifetimes

It’s important to realize that Exadata software should be updated on a regular basis throughout its lifecycle. Oracle anticipates that customers will refresh Exadata hardware after approximately 7 years of use or even more frequently in some cases. MOS Knowledge Base document KB467937 documents which Exadata System Software Releases have been certified on which Exadata Hardware Generations. The matrix in KB467937 shows the earliest certified release on a hardware generation, and will show the final certified release when that occurs. Certification is the process of testing Exadata System Software on a given Exadata Hardware Generation. Oracle runs approximately 25 million tests during each certification run, ensuring customers will not encounter issues. Oracle runs certification tests on hardware until Last Ship Date plus 7 years (LSD+7) or longer as outlined in KB467937.

Data Guard Considerations

Oracle Data Guard is an important component in minimizing downtime in high availability environments. However, it’s important to understand that REDO apply in Data Guard doesn’t serve to warm the Flash Cache. Changed blocks will be pulled into Flash Cache, but read activity is not propagated from primary to standby.

Standby-First Patching (Database patches)

Standby-First Patching is a concept that applies to the Database layer, and has been around since Oracle11g. For patches (RU or Interim) that are flagged as standby-first installable in the patch readme, the binaries (but not the data patch) can be patched on the standby side first.

  • Check pre-requisites
  • Patch standby binaries
  • Switch roles
  • Patch primary binaries
  • Run Datapatch

The Standby-First Patching process needs to be integrated with the Exadata System Software patching process. For more information on patching databases that use Data Guard, please refer to the manual here.

Database Patching

Exadata System Software releases require certain minimum Database patching. As of this writing, all Oracle Databases should be running one of the following versions:

  • Oracle Database 19c
  • Oracle AI Database 26ai

Although earlier database versions (11g, 12cR1, 12cR2, 18c, 21c, and 23c) can run on Exadata, special support agreements are required and Oracle prefers everyone upgrade instead. If you have 3rd party applications that require one of these older versions, you should put pressure on the application vendor to upgrade. If it’s an internally developed (custom) application, pressure needs to be applied on the internal application owner.

Minimum database software patches for Exadata Releases are documented in KB153930.

Virtualized Exadata

Exadata machines can run bare-metal or virtualized. For virtualized systems, the hypervisor (on the physical host) will be patched, and the virtual machine(s) on the host will be patched separately. Virtual machines on a physical server can be members in RAC clusters residing on different physical server. Physical servers (and hypervisors) are not members of clusters. If using Exascale storage, Virtual Machines can move between physical servers and they can be moved without a restart using Live Migration.

Exadata Patching Process

The process of patching Exadata can vary according to the criteria discussed above. However, the general process is essentially as follows:

  • Preparation
  • Setup Driving System
  • Run pre-checks
  • Backup
  • Apply patches
  • Post-Update Verification

Let’s dive into each of these steps in detail.

1) Preparation

You can begin by looking at the basic contours of the patching process. Preparation includes all of the pre-work required to determine what needs to be done. This is the planning, so some of these will lead to steps that are executed during the patching process.

  • Exadata Hardware Generation(s)
  • Current Exadata System Software Release
  • Target Exadata System Software Release & prerequisites
  • 3rd Party Software Installed
  • Current System Health
  • Check for Customizations
  • High Availability Requirements & Options for HA

Exadata Hardware Generation(s) involved will dictate which Exadata System Software releases can be applied on that hardware. Watch for older hardware that is approaching End of Certification and needs to be refreshed. Every Exadata System Software release will allow direct upgrade from certain other releases with a minimum Maintenance Release for each. If you’re following the minimum upgrade interval (upgrading at least yearly), you should already be meeting the minimums. However, if you are delaying your patching for a longer interval, it might be necessary to apply a Maintenance Release before applying the target Exadata System Software Release.

2) Setup Driving System

Exadata System Software patching can be done from a separate system or from one of the Exadata Database Servers. The advantage of using a separate system is that particular system doesn’t need to be upgraded as part of the process. If you’re running the upgrade from an Exadata Database Server, you’ll need to switch the driving server at some point in the process. In other words, you cannot use a driving system to update itself.

3) Run Pre-Checks

The overall plan built during the preparation phase will involve some steps that are executed during pre-check. For example, the preparation/planning process might identify certain 3rd party software is installed on the system, which will mean that software will be either uninstalled or RPM dependencies will have to be addressed during the upgrade. In other words, running of pre-checks happens during the execution phase of the patching process, whereas preparation is the planning phase.

4) Backup

A full system backup and database backup need to be completed during the execution phase of patching. This provides a fallback in the event patching fails.

5) Apply Patches

Calling these “patches” is somewhat of a misnomer, since Major Versions, Releases, and Maintenance Releases might be involved in the process. It really depends on the current vs. target release involved and what boundaries of Major Versions and Releases are being crossed.

6) Post-Update Verification

The final step of any system patching or upgrade should always involve verification. Databases need to be running and accessible, applications need connectivity. It’s often important to TEST the application to ensure everything is working properly before declaring an end of the patching process.

Debugging

Technicians executing the patching need to be adept at debugging the process. Fast response to problems during patching will mitigate downtime and business impact. Debugging starts with examining any log files produced by the driving process. For example, the Exadata patchmgr tool generates logs that are helpful in debugging the process.

Advantages of Exadata Exascale

Exadata Exascale was first introduced in 2024, and brings some big advantages over the ASM (Automatic Storage Management) architecture that we’ve had since Exadata was first introduced in 2008. You need to run Oracle Database 23ai to use Exascale, but that simply means you get access to over 300 new database features like AI Vector Search and JSON Relational Duality in 23ai.

More Efficient Space Usage

Exascale puts all storage in a single pool rather than separate Disk Groups for DATA and RECO (and the optional SPARSE Disk Group) we have with ASM. Those separate silos of storage end up wasting space and it’s not easy to change the allocations. Exascale storage capacity is simpler to manage because it’s pooled storage.

Eliminates Duplicate Management

You create an ASM Disk Group for RECO, then you create an FRA (Fast Recovery Area) in each database and put it in RECO. That’s a bit of duplicate effort that gets eliminated because Exascale doesn’t need a separate RECO area to hold recovery data like your FRA. You size RECO, then you size FRA for each database with ASM. With Exascale, you just size the FRA.

Vaults for Security and Resource Management

Within a Exascale Storage Pool, you have Vaults, which are logical constructs that provide security isolation and resource controls. You can have arbitrarily large numbers of Vaults, and it’s fast and easy to add more of them and change their resource limits. Each Vault can include limits on:

  • Storage space
  • IOPS
  • XRMEM Cache
  • Flash Cache

These controls let administrators keep one tenant from impacting another, meaning they prevent “noisy neighbor” problems. When I say “tenant” here, I’m talking about a Virtual Machine cluster, which contains one or more databases (more about that later).

Scale Extra Small to Extra Large

Exascale allows storage for a tenant to scale from Gigabytes to Petabytes, giving it a much wider range than Exadata with ASM storage. The smallest Exadata system gives you about 52 TB of storage for DATA for each Storage Server (with triple mirroring) and there is a minimum of 3 Storage Servers. You can easily see how the number of tenants (VM Clusters) gets large very quickly if you set the smallest storage for a tenant at 300 GB or even 1 TB in size.

Separation of Compute & Storage

ASM uses software running on each compute server to control allocation of and access to storage. This architecture creates a tight coupling between compute and storage. Exascale eliminates this coupling and provides better separation between compute and storage, making management simpler and more flexible.

Database Aware Thin Clones

Thin Clones are copies of databases that don’t consume space until changes are made. Being “database-aware” means there is a single DDL command to create them rather than using a bolt-on utility. Easy, fast, and space efficient copies of databases.

Multi-Generation – Mixed Disk Sizes

Disks often get larger from on hardware generation to the next. ASM requires equally sized disk slices. You could expand an older system with newer generation storage, but you would either sacrifice the extra space or create extra Disk Groups with that space. Exascale lets you just put the storage into the same pool and it handles it without sacrificing space.

VM Images on Shared Storage

The storage for a Virtual Machine includes the boot volume, Oracle Database homes (software) and other contents of a running VM. Exadata has always put VM images on each Database Server. Exascale lets you put VM storage on the Exascale shared storage, which brings multiple advantages as we will see.

Effectively Unlimited VM Storage

The amount of space each VM needs is relatively small compared to the shared storage of Exadata. Moving VM storage off the Database Servers to the Exascale storage side gives you access to more VM space than you’ll ever need, regardless of how many VMs you run.

Massive Numbers of VMs (tenants)

Exadata has been limited to 4, 8, or 12 Virtual Machines for each Database Server, but Exascale dramatically increases that limit. The highest number any customer has asked for was 25, so we doubled that to 50 as our initial limit. We want to make sure it’s rock-solid, so we put a stake in the ground and called it 50. One point about being “rock solid” is they ALL need to boot in a reasonable amount of time on server startup.

RDMA Enabled Storage – High Performance

All of the storage in Exascale is RDMA enabled, whether it’s being used for databases or VM images. The advantage is performance. RDMA is a protocol used by software for extremely low latency and fastest access. It’s completely unique to Exadata. The Oracle Database software makes RDMA calls, and that is only implemented on Exadata.

Live Migration is Coming

We announced at Oracle Cloud World last year that Live Migration would be coming to Exascale. This means that you’ll be able to move a VM from one Database Server to another without shutting it down. What makes this impressive is the fact that Oracle Database uses RDMA for communication and IO on Exadata. RDMA is extremely fast, but it turns Live Migration into rocket science.

Conclusion

Exascale is the next generation software architecture for Exadata. It provides advantages for databases and virtual machines, allowing you to scale from XS to XL in virtually any dimension.

What Makes Exadata Faster?

In this blog post, we will explore what makes Exadata the fastest database platform in the universe.  We see Exadata being compared to servers like IBM’s Power Systems.  We also see Exadata compared to All-Flash disk arrays such as Dell/EMC Xtremio and Pure Storage. We also see Exadata compared to various solutions proposed by Cloud vendors  How does Exadata stack up against these technologies?  How can Oracle claim Exadata is faster?

Keep reading to learn what makes Exadata faster, including the latest innovations as of November 2022, and watch for more innovations to come!

Integrated Hardware & Software

To begin with, Exadata is a fully integrated system, while these competing technologies are simply one component.  Exadata is comprised of:

  • Clustered Servers
  • Cluster Interconnect Network
  • Storage Network
  • Active Storage
  • Software

Comparing Exadata to servers ignores the storage.  Comparing Exadata to storage ignores the servers.  The only valid comparison is to evaluate Exadata against another full-stack configuration of servers, networking, storage, and software.

Unique Integration + Portability

The Oracle DBMS software has always run on virtually ANY hardware platform.  Oracle came of age in the era of Open Systems, where Oracle gained significant advantage over competitors by being portable across platforms that supported open standards.  To this day, Oracle still runs on Solaris, AIX, Windows, and a wide array of Linux distributions including RedHat, SUSE Linux, and Oracle’s own Linux distribution.

While we can expect Oracle to continue supporting Open Systems, that approach to product development has essentially run out of room for innovation.  Oracle reached a point in the early 2000’s where significant advancements were required to achieve the next level of performance.  Integration of the Oracle DBMS software with a specific (Oracle-supplied) hardware configuration was necessary to move beyond the limits of open standards.

What is most surprising about the rise of Exadata is that Oracle has been able to achieve this tighter integration without jepoardizing portability and interoperability with existing platforms.  Databases can be migrated back and forth between Exadata, AIX, Windows, Linux, and all platforms that Oracle supports.  Those databases simply run better on Exadata.

Fast & Cost Effective

Oracle has focused primarily on the fact that Exadata is FAST and delivers the highest database performance of any platform possible.  Database performance is obvious and easy to understand.  Database performance has a direct (positive) impact on application performance, delivering benefits to business users that are quite obvious and easy to quantify.

What is less obvious about Exadata is that the same performance advantages also make Exadata extremely cost effective.  The cost of Exadata needs to be compared to cost of servers, networking, storage, and software, not against one or another of these components.  As we shall see in the following sections, the features that make Exadata fast also combine to make Exadata cost effective as well.

High Availability, Redundancy & Scalability

It’s critical to understand that Exadata is a fully redundant system that provides high availability as well as scalability.  This fundamental fact of systems architecture underlies the entire design of Exadata.  Exadata is also able to deliver HIGH PERFORMANCE while still delivering these capabilities.

Other competing systems can deliver high performance, but only by sacrificing one of these attributes of high availability, redundancy, and/or scalability.  For example, a system that puts all data in memory (DRAM) can provide high performance, but such a system cannot scale to larger data volumes, and simply cannot provide redundancy and high availability.  Likewise, a system with Flash Disks on the internal system bus (such as PCIe) will provide high performance, but without scalability or high availability.  These systems cannot scale beyond the amount of data that can be stored internally, and non-shared Flash disk storage eliminates the possibility of clustering.

Fast & Large Servers

From a pure “brute force” hardware standpoint, Oracle offers fast & large servers that equal or exceed anything on the market.  Exadata is constantly updated with the latest CPU chips with each new generation.  The current generation X9M-2 Exadata machines for on-premises deployment (either traditional on-prem purchase or Cloud@Customer) have 32-core Intel Xeon processors and 2 sockets, for a total of 64 cores per Database Server or 128 vCPU (Virtual CPU).  Exadata also comes with a MINIMUM of 2 database servers for redundancy. The upper-end scale of Exadata is exceedingly large, including the ability to cross-connect Exadata up to 18 racks wide.

Consider the example of a single Exadata “machine” with 32 Database Servers (NOT the absolute limit!), which delivers 2,408 processor cores or 4,096 vCPU! Exadata Database Service (X9M) on Dedicated Infrastructure runs even larger AMD chips with 126 processor cores (252 vCPU) per Database Server, which gives 4,032 processor cores, or 8,064 vCPU per system! This means a SINGLE DATABASE can run with 8,064 vCPU worth of processing power on Exadata in the Oracle Cloud.

By any measure, Exadata meets or exceeds the raw “brute force” processing power of any competing server on the market.  Exadata then EXCEEDS those competitors through vastly better clustering technology that is enabled through hardware/software integration as outlined in this blog.

Large Memory Capabilities (DRAM)

The fast & large database servers within Exadata also come with large memory (DRAM) capabilities as well. The X9M-2 (on-premises) model can be configured with as much as 2TB per node, or 16TB per rack in a standard “fractional” configuration with 8 Database Servers.  The DRAM is configured into the global database buffer cache that is effectively aggregated across nodes.

Optimized Device Drivers, O/S, Network, VM, DBMS

Oracle Development puts an enormous amount of effort into holistic optimization of device drivers, the Linux Operating System, Networking, Virtual Machine software, along with the Oracle DBMS software.  These efforts are a major factor that has kept Exadata ahead of all other platforms for the past decade.

All-Flash Storage Option

Although most customers choose the Flash + Disk configuration of Exadata, Oracle also offers an All-Flash Storage Option for on-premises customers.  Oracle has invested heavily in Flash Cache capabilities that are outlined in this blog post, making the Flash + Disk configuration outperform the largest All-Flash disk arrays on the market.  Flash + Disk in Exadata provides the best possible combination of price/performance on the market.  However, some customers still need an all-Flash capability in some cases.

The All-Flash option of Exadata (known as Extreme Flash or EF) ensures that I/O will always be satisfied at the speed of Flash.  The standard Flash + Disk configuration of Exadata will see the vast majority of I/O (95% or more) going to Flash in most cases.  However, some I/O still hits spinning disk before the data is finally cached into the Exadata Smart Flash Cache.  Oracle offers Extreme Flash for those situations where customers need a guarantee that 100% of I/O will come at Flash speeds all the time.

What Makes Exadata Special

After more than 10 years of continuous development, Exadata now has features big and small that make it the most effective platform possible for running Oracle databases.  These features include:

  • SQL Offload
  • Active Storage – Cell Offload
  • Massively Parallel Processing (MPP) Design
  • Bloom Filters
  • Storage Indexes
  • High Bandwidth, Low Latency Storage Network
  • High Bandwidth, Low Latency Cluster Interconnect
  • Fast Node Death Detection
  • Smart Flash Cache
  • Write-Back Flash Cache
  • Large Write Caching & Temp Performance
  • Smart Flash Logging
  • Smart Fusion Block Transfer
  • NVMe Flash Hardware
  • Columnar Flash Cache
  • In-Memory Fault Tolerance
  • Adaptive SQL Optimization
  • Exadata Aware Optimizer Statistics
  • DRAM Cache in Storage

SQL Offload – The 1st Exadata Innovation

The first innovation Exadata brought to the market when it was released in 2008 was the SQL Offload feature.  All other platforms aside from Exadata work by moving data from storage into database servers.  By contrast, Exadata works by moving SQL processing and other logic from the database server(s) into the storage layer.  The following is a simple example that shows how Exadata handles SQL query processing.

Screen Shot 2018-02-09 at 2.20.45 PM

It’s important to note that this is ONE SIMPLE EXAMPLE that shows how query offloading works.  Complex queries that involve querying and filtering data will have operations offloaded into the “active storage” layer of Exadata for processing.  Query logic is moved to the data rather than moving data to the database server to be operated on by the query.

Exadata storage processes SQL fragments (component pieces of SQL statements) that are derived from the SQL execution plan.  The Exadata storage then returns data to the database server in what is known as “row source format”, which is a subset of both rows and columns from the underlying table.  As discussed previously, Exadata has an extremely high bandwidth, low latency storage network.  SQL Offloading means than Exadata also places less demand on this storage network than other architectures.

Active Storage – Cell Offload

Exadata has what can be described as an “Active Storage” layer, which means that database processing of all sorts happens within the storage layer.  All other storage products in the market are what Oracle calls “block servers” that simply accept and process requests for I/O on database blocks or ranges of blocks.

The “Active Storage” layer of Exadata will act as a “block server” in some cases, but it is also able to process higher level commands from the database engine.  Some examples of the “active storage” capabilities of Exadata include the following:

  • SQL Offload
  • XML & JSON Offload
  • RMAN Backup (BCT) Filtering
  • Data file vs. REDO I/O Segregation
  • Encryption/Decryption Offload
  • Fast Data File Creation

Oracle has pushed numerous database functions into the storage tier on Exadata, leveraging the “active storage” capabilities of the platform to provide higher performance than can be achieved on any other platform.

All-Flash disk arrays cannot achieve the performance that Exadata delivers, simply because that fast Flash sits behind a slow network.  Even though Exadata has the highest bandwidth, lowest latency network in the industry (exceeding the speeds of Fiber Channel SAN networks), it’s simply not enough to overcome the laws of physics and “speed of light” limitations.  Cell Offloading moves LOGIC to DATA in order to take full advantage of the I/O capabilities of Flash.

To give an example of the horsepower available in the Exadata storage layer, the standard fractional configurations of Exadata (Quarter, Half, and Full Racks) deliver an additional 87.5% more processing power in the storage tier for each core in the database tier.  For example, a standard “fractional” full rack of Exadata X9M-2 has 512 processor cores in the database tier, and 448 processor cores within storage.

Massively Parallel Processing (MPP)

Some of Oracle’s competitors still highlight their “shared nothing” architecture and the fact that Oracle database (on non-Exadata platforms) is a “shared everything” architecture.  This has often risen to the level of a religious war, with some people claiming that Exadata isn’t really (truly) a Massively Parallel Processing (MPP) platform.

For some background, consider this…

In a shared nothing design, each node of an MPP cluster owns a set of data and handles all processing of data that resides on that node.

In a shared everything design, each node of the cluster can access all data, and data can be processed on any node.

While the Oracle database on non-Exadata hardware is a “shared everything” design, Exadata is really a hybrid of both approaches.  Each Exadata storage cell owns a set of data and handles all processing on that data.  Database functions that are more data intensive (process large volumes of data) are offloaded into the storage layer.  Other functions of the database are processed in the central core or processing cluster of Exadata.

The argument that Exadata isn’t truly a “Massively Parallel Processing” (MPP) platform is quite silly based on that fact a Full Rack of Exadata has 674 processor cores. If that amount of processing power isn’t “massive”, consider the fact that Exadata can scale to 18 racks wide, or 12,132 processor cores.  One piece of so-called “evidence” that competitors cite is how JOINS are processed in Exadata, but customers need to understand Bloom Filters to understand the implications.

Bloom Filters

Exadata does not directly process JOIN conditions inside the Exadata storage layer, but this does not tell the full story.  Exadata makes use of “Bloom Filters” to facilitate JOIN processing.  Filter criteria from the JOIN is pushed into the Exadata storage tier to filter the data.  According to the processing methodology outlined by Burton Howard Bloom (the father of Bloom Filters), this technique is a probabilistic approach that will return a small percentage of false-positives, but will filter-out the vast majority of non-qualifying data.

Bloom Filters allow Exadata to offload the vast majority of data filtration related to SQL JOIN processing.  While the final process of merging data into a single result set is done on the central RAC cluster of Exadata, the vast majority of processing (data filtration) is performed on the cells using Bloom Filters.

Storage Indexes

Exadata internally generates indexes of data value ranges on Oracle database blocks stored within each Exadata Storage Cell.  These are referred to as Storage Indexes, and allow Exadata to bypass database blocks that don’t contain values specified in the SQL where clause or join criteria.

Storage indexes are often used for secondary index access on the Exadata platform, and often eliminate the need for secondary b-tree indexes.  Oracle recommends that customers create PRIMARY KEY and UNIQUE KEY indexes where required to enforce uniqueness.  Oracle also recommends that customers create Foreign Key Covering Indexes because those will represent the most likely access paths.  However, beyond those simple indexing rules of thumb, Exadata typically will not require additional indexes.

It’s also important to note that PARTITIONS also represent what is essentially a coarse-grained index, and SUB-PARTITONS serve essentially the same function as well.  Beyond basic indexing and data partitioning, Exadata’s Storage Index feature generally provides all that is needed for final data indexing to deliver needed performance.

High Bandwidth, Low Latency Storage Network

Exadata has an internal storage network that provides both high bandwidth and low latency.  This storage network is currently based on RoCE (RDMA over Converged Ethernet), but the specific physical technology used inside of Exadata isn’t nearly as important as what it delivers.  The storage network of Exadata is the “blackplane” of the system, and is isolated from the customer’s data center network(s).  Customers should retain this isolation to make future upgrades of Exadata easier without disrupting the large data center network, and without requiring upgrades to the data center network.  Put another way, customers should avoid extending the RoCE network of Exadata unless absolutely necessary.

The current RoCE network inside of Exadata delivers 100 Gigabits per second, and is bi-directional for overall 200 Gbps.  Bandwidth to and from storage is critical for database operations that involve large data movements, such as data loading (usually for Data Warehouse) and large data extracts from the database (ETL outbound to other systems).  Notice that I didn’t highlight “table scans” in this case, because Exadata uses SQL Offloading as discussed in the previous section.

While I/O bandwidth to/from storage is certainly important for certain database operations, I/O latency is also critical for many other operations.  Single block or single row lookups are examples of cases where I/O latency can be critical.  Even more critical is I/O latency for REDO LOG operations.  Redo log writes are especially sensitive to I/O latency, and even more sensitive when transaction COMMIT is involved.  The DBMS must externalize COMMIT markers to storage before transactions can proceed, so low latency is critical on these types of writes.

Oracle has been a big contributor to the advancement of networking technologies, and Oracle will continue these contributions to the industry.  One example of this is the advent of RDMA (Remote Direct Memory Access), which highly benefits Exadata in terms of I/O latency.

Screen Shot 2018-02-09 at 12.41.19 PM

High bandwidth, low latency access to storage is critical to Oracle database performance, and Exadata delivers these capabilities better than any other platform.  The integration of hardware and software in Exadata are what make this possible.  The following white paper provides an in-depth look at this topic.

http://www.oracle.com/technetwork/server-storage/networking/documentation/o12-020-1653901.pdf

High Bandwidth, Low Latency Cluster Interconnect

Exadata uses a unified network for all internal communication, including access to storage as well as for the cluster interconnect.  The previous section on storage networking within Exadata also applies to the cluster interconnect.  However, most other platforms use a SEPARATE network for storage and cluster interconnect.  All systems that are based on Fiber Channel SAN technology (Storage Area Networks) will have a separate IP (Ethernet) network for the cluster interconnect.

We have seen that the cluster interconnect often provides critical performance advantages in a active/active clustered system.  In fact, the cluster interconnect can be vastly more important for some workloads than performance of the storage network.  We have seen Exadata achieve more than 2X higher OLTP transaction throughput (measured at the application layer) compared to other systems, purely because of the cluster interconnect performance differences.

RDMA Cluster Interconnect

Starting in the X8M generation and continuing with X9M, Exadata uses RDMA (Remote Direct Memory Access) to speed transfer of data between Database Servers across the cluster interconnect. This technology eliminates the typical request/response mode of network communication, delivering ~6µsec (microsecond!) access latencies, which is dramatically faster than other platforms. It is important to note that the Oracle Database Software itself performs these RDMA calls to transfer database blocks between nodes of the cluster (in a secure manner of course!), which is yet another example of the tight software/hardware integration on Exadata.

Fast Node & Cell Death Detection

The typical cluster interconnect network uses standard IP (Internet Protocol) over ethernet, which is high performance and supported across virtually all platforms, but brings some disadvantages.  Even in earlier versions of Exadata, the ability of the system to quickly detect failure of nodes within a cluster was hampered by network timeout waits.  The following graph from testing by Oracle’s MAA (Maximum Availability Architecture) team in 2013 shows the issue with node failure detection.

Screen Shot 2018-02-09 at 12.56.35 PM

This graph shows a 30-second delay in transaction processing, while the system waits for network timeouts before it can determine that a node has died.  The full video by Oracle’s MAA team can be found on Vimeo at this link (HERE).  Other platforms might seen network timeouts lasting as long as 120 seconds, which can be a significant business impact on large scale systems.  While Exadata was certainly better than other systems back in 2013 when this video was produced, Oracle has since improved upon this capability with the Fast Node Death Detection feature.

As we said earlier, Exadata is an integrated hardware/software solution, and Fast Node Death Detection is a stunning reminder of this fact.  Rather than relying on network timeouts to determine if a node has failed, Exadata moves the cluster member oversight function into the cluster interconnect network.  The cluster interconnect network is now responsible for detecting the death of nodes in each cluster.  The following graph shows how node death detection is vastly improved.

Screen Shot 2018-02-09 at 1.07.51 PM

This feature also applies to detection of cell death in an Exadata environment, resulting in much faster system reconfiguration and the lowest possible application/business impact possible.

Smart Flash Cache

The best way to understand Exadata’s Smart Flash Cache capability is to first compare it to the “tiered storage” concept used by Storage vendors.  Tiered storage is an attempt to deliver a better combination of price and performance as compared to a single type of storage.  Tiered storage moves “hot” data to faster media, such as moving from spinning disk to Flash storage.  Storage tiering can be accomplished through manual data placement, but some vendors have attempted to automate movement of data between slower and faster tiers of storage, typically with corresponding higher and lower storage density, such as spinning disk versus Flash storage.

Instead of using a “tiered storage” concept, Exadata automatically CACHES data into Flash instead of moving the data.

Write-Back Flash Cache

In the early days of Exadata, the Flash Cache was used to provide improved response for READ operations.  However, Oracle later enhanced this feature to also cover write operations.  Most database writes are done “asynchronously” from end-user transactions, so improving write performance doesn’t always improve application performance.  As long as the Oracle database writer process (DBWR) stays ahead of transactions and clears dirty blocks from the buffer cache fast enough, write operations won’t slow the database.

Although it’s true that most writes are not time sensitive in the Oracle database, write operations do become critical in some cases.  Redo writes in particular are quite sensitive to latency.  See the section of Smart Flash Logging for more information.

TEMP writes occur when SQL statements sort data using an ORDER BY clause, and when the amount of data being sorted is too large to fit into memory.  In these cases, each “sort run” is written from memory onto storage, and those writes should be cached.  See the section on Large Write Caching for more information on this topic.

Beyond redo writes and large writes (especially for TEMP processing), the Oracle database on Exadata can still gain performance through use of write-back Flash Cache.  Use of Write-back Flash Cache requires that ALL mirror copies are cached, meaning that TWO copies of each write are stored in Flash Cache with NORMAL redundancy, or THREE copies are stored in Flash Cache with HIGH redundancy.  Earlier versions of Exadata had smaller capacity Flash hardware.  As “Moore’s Law” has brought larger and larger Flash modules, Exadata now offers an even larger Flash Cache than with earlier versions.

RDMA Capable Cache Using PMEM

Exadata also uses a separate cache to speed single-block I/O that is accessed by the DBMS using Remote Direct Memory Access (RDMA). The current X9M generation of Exadata uses Intel Optane Persistent Memory (PMEM) as the basis of this cache because PMEM provides a memory-addressable location. Exadata Storage Server software determines which database blocks are subject to the highest rates of single-block I/O and places those blocks in a memory-addressable in the storage itself. Oracle Database Software is then able to access those blocks using Remote Direct Memory Access (RDMA), which is dramatically faster than even the fast I/O response Exadata delivers from FlashCache. Customers can expect less than 19µsec (microsecond!) response time for single-block I/O, which is included in AWR Reports (reported as “cell single block physical read” on Exadata or “db file sequential read” on non-Exadata platforms).

Large Write Caching & TEMP Performance

Exadata even caches large writes (128KB and larger) into Flash Cache, taking full advantage of Flash capabilities.  As the hardware has evolved and larger Flash drives have come on the market, Oracle has also evolved the Exadata software to match these capabilities.  For more information on this topic, please see Section A.2.6 of the Exadata manual details (HERE).

Smart Flash Logging – Fast OLTP

OLTP performance often suffers from spikes in latency of redo log writes.  While average redo write performance might be good, these periodic spikes in latency often have a detrimental impact on overall application performance.  This can be easily seen on systems by looking at AWR historical data.  It’s critical to look beyond the averages and look for spikes, which are often seen in the standard deviation of redo log write latency.  The following graph shows the existence of spikes in redo write response times that impact transaction response, and how these spikes are corrected by this important Exadata feature:

Screen Shot 2018-02-09 at 11.11.49 AM

Using unique hardware/software integration, Exadata is able to treat I/O activity for redo logs in a distinctly different manner than I/O for other database structures.  Exadata knows which I/O’s are highly critical to database performance and treat those I/O’s differently from less critical I/O.  Generic disk or Flash storage technologies lack this tight integration with the Oracle database.  The result is faster OLTP application performance.

Smart Fusion Block Transfer – Fast Clustered OLTP

Smart Fusion Block Transfer is an Exadata-specific feature that improves performance of OLTP applications running across clustered database nodes within Exadata.  This feature requires close synchronization of processing within the Oracle database, including how log writes are tracked across nodes within Exadata.  Exadata is able to transfer database blocks across nodes without waiting for completion of redo log writes.

Screen Shot 2018-02-09 at 10.54.36 AM

While this is a highly technical feature that requires deep understand of the inner workings of the Oracle database, customers simply need to understand this feature results in higher performance of OLTP applications on Exadata.

NVMe Flash Hardware

The fundamental architecture and design of the Exadata hardwre allows Oracle to quickly adopt the latest technology innovations as they are introduced into the market.  Exadata internally is a very modular design that can accept hardware revisions more quickly than large, monolithic server designs that come from some Oracle competitors.

The introduction of NVMe Flash in Exadata is only the most recent example of how Oracle has very quickly adopted new hardware technologies to keep Exadata ahead of the competition.  Non Volatile Memory Express (NVMe) is the latest advancement in Flash disk technology.  Rather than essentially “emulating” the behavior of a spinning disk (as can be found in Flash SSD), NVMe Flash uses a protocol that is designed from the ground-up to support Flash.

Columnar Flash Cache

Exadata automatically transforms HCC data into pure columnar format when it places that data into Flash Cache.  Data on disk in HCC format is stored in “Compression Units”, which represent an unnecessary fragmentation of data once it’s brought into the Flash Cache.  The following diagram shows how data is represented differently in Flash Cache without being organized into Compression Units:

Screen Shot 2018-02-09 at 4.23.15 PM

Organizing HCC data into a pure columnar format will increase performance by 5X on queries that access data in the Flash Cache.  This feature also facilitates bring data into the DRAM cache using the In-Memory capabilities of Exadata.

In-Memory Fault Tolerance

The Oracle In-Memory database option is not specific to Exadata, but there are significant advantages to running In-Memory on the Exadata platform.  Chief among these advantages is the Exadata specific In-Memory Fault Tolerance feature.  The following diagram shows this feature graphically:

Screen Shot 2018-02-09 at 4.28.41 PM

In-Memory Fault Tolerance means that data can be effectively mirrored across nodes of the database cluster inside of Exadata.  This feature gives customers more options for using the DRAM buffer cache on the nodes of the cluster.  In the event of a node failure, the contents of another node can be used to satisfy the query.

Adaptive SQL Optimization

Although not exclusively an Exadata feature, Adaptive SQL Execution is extremely critical for Exadata, since the majority of Oracle Data Warehouse deployments have moved to the Exadata platform.  Version 1 of Exadata was exclusively targeted at Data Warehouse deployments, and many Exadata features remain firmly targeted at Data Warehouse workloads.  Adaptive SQL Optimization applies specifically to the optimization of highly complex SQL statements.

The Oracle database engine was originally designed for OLTP (prior to Oracle 7.1.4), and the OLTP heritage was apparent in how it optimized SQL statements.  The Oracle SQL optimizer originally operated in a single-pass manner.  As the term implies, the optimizer would execute once at the start of each SQL statement execution, evaluating a limited number of SQL execution plans.  We could play with things like the maximum number of execution plan permutations, but the SQL optimization would only occur once.  SQL optimization needs to happen quickly, and generally in less than around 250msec, or it will appear to users as a performance problem.

Adaptive SQL Optimization means that it’s no longer a single-pass operation.  What generally happens is that the SQL plan is accurate to a certain number of levels, but intermediate result set cardinality estimates can be inaccurate with highly complex queries.  The cardinality (number of rows) in an intermediate result set will often determine the access path of the next level in the query plan.  If Oracle detects a significant variation in the actual vs. estimated intermediate result set cardinality, the SQL statement will be re-optimized on the fly.

Of course the fundamental accuracy of SQL execution plan selection is highly dependent on optimizer statistics.  Adaptive SQL Optimization should help to overcome issues with stale optimizer statistics, but a better solution is to gather proper statistics in the first place.  Fortunately, Exadata helps with statistics gathering as well.

Exadata Aware Optimizer Statistics

The Oracle SQL Optimizer is well aware of the capabilities of the Exadata platform.  Optimizer statistics are gathered using the DBMS_STATS package, and those statistics consider the capabilities of Exadata.

DRAM Cache in Storage

While Exadata Smart Flash Cache has been around since Version 2, the latest versions of Exadata also use DRAM for caching data at the storage tier.  While the Exadata Smart Flash Cache was already fast, the new DRAM caching at the storage layer provides an additional 2.5X faster data access.

Screen Shot 2018-02-10 at 11.49.55 AM

As shown above, the DRAM cache in Exadata storage provides another layer of automatic data caching to speed execution of database I/O, especially for OLTP applications.

12 Years Later, an Exadata 4X Larger than the biggest Amazon can offer

I ran across this photo from 12 years ago and got to thinking it’s still more than 4X larger than the largest system you can construct for an Oracle database on Amazon’s RDS (Relational Database Service). This is a single Exadata Version 1 system spanning 3 data center racks.

Exadata Version 1 – Triple Rack System

This was one of the first systems I had seen at a customer site and it was a triple-rack configuration.

  • 3 Data Center racks wide
  • 528 CPU cores
  • 504 disk drives
  • 226 Terabytes of storage

Of course the latest Exadata systems are much more powerful than this, but it’s stunning when you realize that Amazon cannot match even 1/4 of this machine from 12 years ago. The largest Oracle database you can run in Amazon is around 50 Terabytes. The largest number of CPU cores you can have in Amazon is 64 cores, but that system (db.x1.32xlarge) will cost MORE than Exadata Cloud Service!

Microservices, Sharding and Consolidation with Oracle Database

As the #1 database leader overall, Oracle is also the best database for microservices architectures and the best database for sharding. Microservices and Sharding are application development and data modeling decisions. Whether to consolidate those databases and how to consolidate them is a “macro-level” infrastructure management decision. In this article, we will explore these topics:

  • Microservices Design Pattern: Database Per Service
  • Sharding: Subdividing a Large Database into Shards
  • Why Isolate Databases?
  • How to Isolate Databases
  • Don’t Over-Isolate: Limit Virtual Sprawl
  • Stop Noisy Neighbors: Use Resource Manager
  • Use Resource Shapes for Simplicity
  • Reducing Blast Area Still Means a Blast!
  • HA is Still Important With Microservices & Sharding
  • Data Driven Apps: Benefits of Converged Database

Oracle is a Converged Database, providing the full range of database capabilities for modern Data Driven Applications. Oracle Database provides industry leading capabilities that exceed what point-solution databases can deliver.  You can deploy Oracle Databases as separate, dedicated databases supporting specific applications or microservices, or consolidate them to make more efficient use of system resources and administrative staff. Oracle Database can scale much larger than other databases, but can also scale-down to handle even the smallest microservices or sharding needs.

Microservices Design Pattern: Database Per Service

The Database Per Service Design Pattern says that each microservice has it’s own “database”, which means a collection of data and does not necessarily refer to a dedicated Oracle Database. In fact, (as outlined by Chris Richardson here) there are 3 ways for each microservice to have it’s own set of data as follows:

  • Private Tables per Service
  • Schema per Service
  • Oracle Database per Service

Each microservice has it’s own set of data, and that data is only accessed through API’s belonging to the microservice. Whether a particular microservice has a set of tables, a dedicated schema, or an entire dedicated database generally depends on the SIZE of data, volume of activity and need for isolation. Microservices with larger amounts of data will tend to have their own databases, whereas smaller amounts of data and activity would argue for a dedicated schema or even simply a number of tables within a schema. Of course an Oracle Database can be a stand-alone database, but multiple databases can also be combined together as Pluggable Databases within a Container Database. We will look at this and other isolation topics in later sections of this post.

Sharding: Sub-Dividing a Large Database into Shards

I have worked on multiple applications where we sub-divided a massive logical database into many physical Oracle databases going back to the 1990s. The sharding concept is really nothing new, but Oracle Database now offers Sharding as built-in, out-of-the-box services that make building sharded databases and applications much simpler. Sharding features are built into the Oracle Database so that application developers don’t need to implement those features in application code.

At the end of the day, when you shard a database into multiple smaller pieces, you still have the same amount of data. If you shard a 70TB database into 10 shards of 7TB each, it’s still 70TB. If you shard that data into 100 shards, it’s still 70TB. Oracle is the KING of managing massive amounts of data, and it doesn’t matter if that’s 1 database or 100.

The point of sharding is that each database will be smaller and therefore easier to operate. You can then isolate those databases in order to improve operations.  Let’s look at WHY it’s sometimes necessary to isolate databases, then we will look at HOW to isolate them.

Why to Isolate Databases

Multiple microservices can reside within a single database, or might have dedicated databases (or Pluggable Databases within Containers), while shards are always spread across databases. Once microservice databases and shards are defined at the database layer, there are 5 factors that govern why those databases need to be isolated vs. consolidated as follows:

  • Administrative Separation
  • Security Separation
  • Maintenance (patching and upgrades)
  • Blast Radius (scope of failure impact)
  • Resource Management

Administrative Separation refers to organizations that have multiple DBA teams or other needs to separate databases from an administrative standpoint. This is also common in SaaS (Software as a Service) providers, where customers of the service provider have administrative access, or the service provider has separate teams that administer databases. In either case, the multiple administrative teams means those databases need to be isolated from each other.

Security Separation refers to use of dedicated networking infrastructure to service specific databases (quarantine LAN, etc.), and subjecting certain databases to higher security standards such as for regulatory reasons (HIPAA, PCI, PII, etc.). Databases must be isolated in cases where security requirements differ widely between them.

Maintenance considerations include patching and upgrades of servers, databases, and any supporting infrastructure. As microservices are consolidated together more closely, any maintenance must be coordinated among those microservices and testing is often required to ensure compatibility. The biggest concern with maintenance is major version upgrades at the infrastructure layer (O/S, database, etc.), where there is greater potential for functional changes that might impact how services operate.

Blast radius (or fault isolation) considerations refer to the scope of impact any failure has. An outage of any single microservice can jeopardize the function of the application as a whole. However, smaller databases can be repaired more quickly than larger database, so limiting the scope of impact can result in faster service restoration during a failure.

Resource Management refers to ensuring each database receives the resources it requires, as well as guarding against the “noisy neighbor” problem. One approach to resource management is to isolate databases onto dedicated physical or virtual machines, but we recommend to simply use Oracle Resource Manager instead.

How to Isolate Databases

In addition to the reasons why to isolate databases, there is also the question of how the Database per Service Design Pattern and sharded databases are deployed at the physical infrastructure level. With Oracle, we have 4 options for how to isolate databases as follows:

  • Dedicated Physical Servers per Database
  • Dedicated Virtual Machine per Database
  • Multiple Databases per Physical/Virtual Machine
  • Multiple Pluggable Databases Per Container
  • Oracle Resource Manager (DBRM & IORM)

We need to make sure developers have the autonomy they’re looking for, but then balance how they are deployed in the infrastructure. Managers of the infrastructure must determine how and when to isolate vs. consolidate databases. Excessive isolation such as the “one database per virtual machine” approach results in high cost of operation, so we recommend a more balanced approach.

Don’t Over-Isolate: Limit Virtual Sprawl

Data Centers in the past often suffered from sprawl (physical sprawl), where each application and it’s database(s) ran on their own physical servers. Virtual Machine technology has allowed IT organizations to stem the tide of physical sprawl, but this has often resulted in virtual sprawl. Increasing compute and storage density has also allowed more workload to be laid on top of the same physical footprint, using virtualization to maintain the same (or even greater) isolation between workloads.

You will quickly build an administrative nightmare if each microservice uses a dedicated database, and if each database uses a dedicated Virtual Machine. You can easily meet the needs of your application developers by taking a more judicious approach to deploying databases by using the full range of options at your disposal, using the right tool for the task such as using Oracle Resource Manager to manage resources.

Stop Noisy Neighbors: Use Resource Manager

There is no reason to isolate Oracle Databases simply for the purposes of resource management. We can easily ensure each database receives the appropriate amount of resources using Oracle Database Resource Manager (DBRM).  There are 4 primary resources that need to be managed in any system:

  • CPU
  • Memory
  • Processes
  • I/O

CPU is managed using Oracle Database Resource Manager (DBRM), using shares & limits inside of a Container Database, Instance Caging (CPU_COUNT) across containers and non-pluggable databases, and within databases using Consumer Groups.  DBRM gives us control of ALL types of databases and workloads, and it’s integrated with IORM (see below for detail).

Memory usage for Oracle databases is managed by controlling SGA (System Global Area) and PGA (Process Global Area) settings.

Processes within Oracle databases are managed by controls for sessions and parallel query servers.

I/O resources are much simpler to manage on Exadata because we have IORM (I/O Resource Manager). Exadata is integrated hardware and software, spanning both compute and storage. Using IORM Objective “auto” allows IORM to inherit the same resource ratios set for CPU in DBRM, so you have one set of controls that handles everything.

See our demo series on Resource Management (starting here) that shows how you can manage resources between pluggable databases, between container databases and non-pluggable databases, and even within databases using Consumer Groups.

Use Resource Shapes for Simplicity

Of course we recommend establishing a standardized set of “resource shapes” to choose from rather than making each database a unique and special snowflake. It’s much easier to manage a large population of databases if they all follow some standards, including the resources assigned to them. Using Resource Shapes means you establish shapes with the same ratios for the following resources:

  • CPU
  • Memory (SGA & PGA)
  • Processes (Sessions & PQ Servers)
  • I/O

I covered this in detail in the MAA Best Practices white paper on Database Consolidation available here. The white paper includes different allocations for DW vs. OLTP databases, so you’ll see 2 different tables of Resource Shapes. DW systems need larger PGA memory and more processes are devoted to parallel processing than on OLTP systems.  You will see those differences in the resource shape tables.

Reducing Blast Area Still Means a BLAST!

Reducing the “blast area” by dividing the data by each microservice and sharding large databases doesn’t ELIMINATE the blast (meaning “failure”). What a smaller blast area gives you is pieces that are smaller and easier to fix (because they are smaller). It’s also important to realize that a piece of an application dead in the water is still dead in the water.  If that piece of the application (a microservice) is critical, the entire application might also be dead in the water.

Sharding is another design that reduces the “blast area” of a failure, but an outage of a shard is still an outage.  It’s just easier to fix because it’s smaller, but it still needs to be fixed! In the best case scenario, you have SOME of your users dead in the water because the data they need (and the microservice) isn’t available.  In the worst case scenario, you will have some microservices or portions of your application that need ALL of the shards available for it to function, and those portions of the application are dead in the water.

In short, reducing the blast area doesn’t necessarily increase availability, but might help in reducing the duration of an outage.

HA is still Important with Microservices & Sharding

High Availability (HA) systems are still important, even for microservices and sharded databases. There can still be a “blast” that takes down a database, which takes down a microservice or shard, which will impact at least some of your users if not all of them depending on how your application uses that data.

Just because you have things broken down into small pieces doesn’t mean there’s no impact of an outage on any piece. It’s still important to provide HA, which we do with these tools:

  • Core HA Features of Oracle Database
  • Oracle Real Application Clusters
  • Oracle Active Data Guard
  • Oracle Application Continuity

Core HA features of Oracle Database have become something that we almost don’t even consider these days, but are still huge differentiators compared to other databases on the market. Oracle experts often take for granted things like online index rebuilds, online table move, and other features that have been developed over the years. I am often surprised to find other databases haven’t caught up, and some of the newer database engines are still years behind.

Oracle Real Application Clusters (RAC) is still unique in the market after all of these years. We often think of RAC for scalability, but it’s a huge part of the Oracle Database availability solution as well.

Oracle Active Data Guard is the Oracle solution for providing Read Replicas  (or “reader farms”), but it’s also a critical part of the Oracle Database availability solution. Active Data Guard provides for availability when a “blast” (failure) occurs, but it’s also used to provide availability during proactive maintenance.

Oracle Application Continuity hasn’t gotten enough press over the past 5+ years, but it’s yet another completely unique capability that Oracle offers. People seem to remember TAF (Transparent Application Failover), but Application Continuity is a completely different animal.  TAF required application code changes, while AC has essentially pushed much of that complexity into the SQL driver for Oracle.

Oracle Database has long exceeded the capabilities of applications, and Application Continuity closes the gap. Applications need to tolerate rolling outages of a RAC Cluster, and Application Continuity is what makes this happen. Application Continuity is implemented through CONFIGURATION changes, not within application code.

Data Driven Apps: Benefits of Converged Database

The Oracle Converged Database brings a number of critical advantages for data driven applications compared to point-solution databases.  See Juan Loaiza’s talk on Data Driven Apps at OOW London 2019 for a great talk on this topic. Although point-solution databases are sometimes referred to as “best of breed”, many of them don’t live up to that claim. You would suppose a database with a narrow focus might do that job better, but that’s not necessarily the case. The Oracle Converged Database advantages include:

  • Data Modeling Flexibility
  • Simplified Data Movement
  • Portable Developer Skills
  • Increased Developer Productivity
  • Any Workload, Any Data
  • Simplified Consolidation & Isolation
  • Any Size, Any Scale

Data Modeling Flexibility comes from having a single database that provides the full range of data modeling needs. While developers might make the perfect decision and choose the exact point-solution database needed, requirements often change. A development team might choose a relational database, only to find that some data really needs a different modeling approach such as JSON Documents.

While Oracle Databases can be deployed using a SINGLE modeling technique (Relational, Document, Star Schema, Property Graph, etc.) you can also use MULTIPLE modeling approaches within the same Oracle Database. I have worked with data that didn’t fit easily into the relational model, so it’s great to be able to use JSON Documents or another technique that fits better for certain portions of your data model. It would be a huge pain (show-stopper really) if you had to switch databases or use another database for a small component like a single microservice.

Simplified Data Movement comes from using the same Oracle Database on both the sending and receiving side. That data movement is made vastly easier if the data resides with a single shared database, but is easier between Oracle Databases because both databases use the same tools, same drivers, same datatypes, etc. Data movement can be completely eliminated in cases where applications share the same data, such as combined OTLP and Reporting in a single database (yes, this is possible and quite common with Oracle). Data Movement can also be quite costly in Cloud environments, which is another benefit of using Oracle Converged Database rather than multiple point-solution databases.

Portable Developer Skills are a key benefit of the Oracle Converged Database, allowing developers to work on ANY microservice or application that uses the same database without extensive re-training. Developers who write analytic or Data Mining code can easily move into a development team working on transactional applications or vice-versa.

Increased Developer Productivity comes from having a common set of interfaces for all databases, regardless of what features are used within each database. Any feature provided by the database represents code that DOES NOT have to be written by a developer.

Any Workload, Any Data includes traditional OLTP and Analytic applications, but also includes Machine Learning, block chain, property graphs, Time Series analysis, Spatial, Internet of Things, and Event Processing. Oracle Database includes robust capabilities in these areas that have been proven over many deployments at customer sites worldwide.

Simplified Consolidation & Isolation comes by having databases that all run the same Converged Database. Administrators have the flexibility to isolate databases where needed, or consolidate them to ease the administrative burden as well as to improve resource efficiency. Oracle Databases can even be consolidated into a Container Database, for much greater density and lower cost of operation. Yes, this also applies to Cloud environments, where costs can easily escalate. The bottom line is you simply can’t do this with multiple divergent database engines such as one for Relational OLTP, one for Relational Star Schema DW, one for JSON Documents, etc.

Any Size, Any Scale database or workload can be handled by Oracle Database. It’s amazing to me that other databases haven’t caught up to Oracle after all these years. We still encounter customers who are faced with a database migration (to Oracle) because their chosen database engine simply can’t keep up. Oracle Database is able to easily support databases at least 10X larger than our competitors can handle, and the Exadata platform simply takes that number higher.

Microservices and Sharding increases the number of databases, while also reducing the maximum size of databases, but it’s great to know your can scale a database without worry if it’s running Oracle Database. You have time to adjust if you need to re-shard your databases or if your microservices databases grow unexpectedly. Having size limits that are 10X or even 100X higher than other databases gives you flexibility.

Microservices and Sharding DO NOT reduce the overall amount of data! In fact, the volume of data can increase somewhat if you’re duplicating any data across microservices or shards. In any case, the volume of data certainly isn’t less.

Summary

Oracle Converged Database gives you flexibility to deploy databases as needed, using microservices and sharding. Oracle is the #1 most widely used database overall, but also the #1 most widely used for microservices and sharding. Oracle Databases can be easily consolidated or isolated as needed to meet the needs of modern Data Driven Applications.

 

NoSQL Improved Upon Record Based Databases

NoSQL databases (known as key/value, key/JSON, or “document” database) provide data that is self-describing, which is a huge improvement compared to older “record-based” databases. NoSQL databases are often compared to (purely) relational databases, but this is primarily because relational databases hold the biggest market. Record-based databases are really a non-entity these days, so there wouldn’t be much benefit in trying to “compete” against them.

The best comparison of NoSQL is against record-based databases.

Record Based Databases

Old fashioned “record-based” databases contained the data, while the structure of data was contained within the application. The database would contain a set of data values such as the following:

123, Chris, Craft, 123-555-1212

The application would know that these data attributes were as follows:

Record Key, First Name, Last Name, Phone Number

The application would typically contain a structure definition for the language the application was written in. If you go back far enough in history, this would have been Assembler or possibly COBOL language. The C/C++ language(s) would have used a struct contained in a header file.

This was fine in the days when ALL of the application code that touched the data was written in the same language. It was a huge pain when multiple applications accessed a common record-based database using different languages, such as a COBOL application that created data, and a C/C++ or Java application needed to access the same data. Someone needed to maintain structure definitions that were in-sync with each other, and it was a huge problem when changes were made to the structure.

Record-based databases included things like VSAM and ISAM. Neither of those databases used SQL, so they would certainly fit the definition of a NoSQL database. I realize the NoSQL people in this world aren’t thinking of VSAM and ISAM to be part of their orbit. Of course that’s a basic problem with the “NoSQL” term itself. Anything defined by what it’s not is very poorly defined.

Self-Describing Data

NoSQL databases typically contain self-describing data. JSON (Java Script Object Notation) is the most commonly used form of self-describing data, but there are other forms as well including XML. Rather than describing data in a struct within the application code, those structure definitions are kept within the data. The database provides a single source of truth for data structure, but also allows for much simpler modification of the data structure and code that access the data as the application and database evolve over time.

A JSON structure matching the previous example might look like this:

{
    "recordkey":"123",
    "firstname":"Chris",
    "lastname":"Craft",
    "phonenumber":"123-555-1212"
}

Of course every single record contains the field names, which consume more storage than the data in this example. Storage is cheap these days and we have much greater processing power than years ago, so there isn’t as much “data pressure” that would force us to define the structure inside the application. The reduction of “data pressure” allows us to use a method that’s less storage efficient to gain advantages in the application development side.

Data Pressure Considerations

The term “data pressure” essentially refers to the cost of storage and the cost of processing larger and larger volumes of data.  Record-based database were extremely efficient in terms of the space they required and compute power to process that data. Less data volume meant less data store and less data to process, so nobody would have considered making data self-describing.

Record-based databases were never self-describing because that simply was not practical decades ago. The cost of storage was simply too high and putting data descriptions into the data itself would have resulted in a huge amount of data duplication (duplication of the data definitions stored within each record), and there would not have been enough compute power on earth to work with that data.

Comparing NoSQL to Relational

NoSQL databases are more about the structure and representation of data than about the  absence of SQL language. Part of this is the same issue of object/relational impedance mismatch that has been around for decades. The rise of object-oriented programming resulted in application code that simply didn’t fit well with data modeled relationally.

Oracle Database supports Key/JSON

The SQL language does not work only with relational data. We can certainly use SQL to access a 2 column table containing a KEY (column #1) and JSON structure (column #2). Oracle Database includes the ability to model data in key/JSON format. Oracle databases might contain nothing but key/JSON data, some relational and some key/JSON, or JSON can be used to extend a relational model.

Oracle is a Converged Database

Oracle Database is a called a “converged” database because it supports virtually any data modeling approach and supports virtually any workload, all within a single database or deployed as separate databases.  Oracle is a multi-model database that supports relational, graph, time series, key/JSON, row-oriented, column-oriented (on Exadata), Geospatial data, normalized models, dimensional models (star schema, snowflake schema, etc.) and others.  Oracle Database supports all workload types including OLTP, DW, and IoT within a single database.

Oracle database uses the SQL language to process what some consider to be “NoSQL” format data (like JSON).

All Data Has Relationships

All data has relationships to other data. You can easily see this by simply looking at any piece of data.  All data has relationships to other data such as:

  • Customers place Orders
  • Orders are for Products
  • Products are in Warehouses
  • Warehouses have Employees

The list of relationships goes on and on, ad infinitum. Ensuring relationships are tracked is critical to data integrity. What happens if a customer orders a product that doesn’t exist? What happens if products go missing from a warehouse?

Databases Simplify Applications

The raison d’être for databases has always been to simplify application code. Anything done by the database is something the application code doesn’t have to handle. The basic functions of a database through the history of IT has been these:

  • Preventing Data Loss
  • Controlling multiple user access to data
  • Enforcing data values are correct
  • Ensuring data relationships are valid
  • Data Security

These functions have been done by databases for decades because it simplifies application code.

Preventing Data Loss

Databases protect data, which is the lifeblood of an organization. Preventing loss of data has been key to survival even in the days of paper records and stone tablets. Electronic records are subjected to loss from a wide variety of failures, and databases are responsible for providing protection against these failures. Data loss might mean loss of the ENTIRE database, but also means changes from one user getting destroyed by another user.

Controlling Multiple User Access to Data

Without databases, applications would face extreme complexity in controlling access to data by multiple users. Access to data includes reading data, but also includes changing that data. Applications would be horribly complex without the concurrency controls provided by databases. Users also shouldn’t have access to changes made by others until those changes are complete.

Enforcing Data Values are Correct

The correctness of data values includes enforcing number attributes contain numeric values, date attributes contain valid dates, JSON strings contain valid JSON, GPS locations are valid locations, countries are valid countries, etc. Without this enforcement by the database, errors in application code will introduce corrupt data, which will have a cascading impact on other application code. If the database contains an order date of February 30th, that’s clearly wrong and it’s difficult to determine how that value got inserted into the database. It’s much better to catch that when it happens and prevent the change.

Ensuring Data Relationships are Valid

Relationships represent a special class of data values that are enforced by the database. This goes to the heart of why databases were created, and why the relational database became the leader. Hierarchical databases could only enforce certain data relationships. Network databases were a little better, but also had limitations. Relational databases (invented by Edgar F. Codd) provided much greater capability to model data relationships and ensure those relationships were reflected in the data.

Data Security

Of course databases play a central role in the security of data, including who can view data as well as who can make changes to data. This includes not simply access to the entire database, but down to individual attributes as well. There are different access controls over who can view customers, who can change customer data, and who can view or change customer addresses and credit cards.

All of this complexity can be pushed into the application code, but we often want separate data access controls enforced by the database. The principal is known as “defense in depth”. Fort Knox has the gold inside a vault, inside a building, surrounded by a fence, patrolled by guards. You certainly wouldn’t want a Fort Knox with the gold sitting in the middle of a field with guards running around trying to protect it. Defense. In. Depth.

Normalization & Denormalization

Data often begins in a denormalized form or at least we often start to think about data that’s not normalized, so we typically “normalize” the data when designing a relational data model. We then “de-normalize” data primarily for performance reasons. One example might be phone numbers. Customers often have multiple phone numbers such as home, work, and cellular phones.

In a normalized data model, each of a customers’ phone numbers would be stored in separate rows of a phone number table related to the customer. However, that means accessing extra rows of data when you want to show them all. To improve performance of accessing ALL of the rows, we might simply put separate home, work, and cellular phone numbers on the customer table. However, what happens when a customer has 2 cell phones?

Phone numbers are a great case for the combination of JSON within an otherwise relational database.  Rather than modeling N number of phone numbers in the customer table, we might create a PHONE_NUMBERS column as a JSON structure.  That design allows a variable number of phone numbers for each customer.

Database Optimization

I heard someone say recently that relational databases aren’t optimized for anything, which is a complete misrepresentation of reality. Every table in a normalized relational data model should have a primary key. That primary key will have an index. Access to a row of data through the index is “optimized” and will give good performance.

The database “engine” does not provide the logical structure of data. Database “engines” (historically) have not automatically generated indexes beyond those needed to enforce constraints such as primary keys and unique keys. Building of secondary indexes (those beyond what’s needed to enforce constraints) has always been the responsibility of the database administrator, data modeler, or application developer. So yes, in a sense the database is not “optimized” out of the box if you don’t optimize it!

Oracle Autonomous Database is the first on the market that is doing this sort of optimization and automatically handling what has traditionally been the responsibility of the DBA, data modeler, or application developer.

Cloud Databases: All-Inclusive vs. Purpose-Built?

Does the emergence of the Cloud mean that “purpose-built” databases make more sense, or is an All-Inclusive database still the best choice?

There are multiple purpose-built databases on the market that handle specific types of data, specific workloads, or have some specialized functionality.  Examples of purpose-built databases include:

  • Relational OLTP Databases
  • Relational Data Warehouse Databases
  • Key/Value Databases
  • Time Series Databases
  • In-Memory Databases
  • Graph Databases

Of course there are other examples, but these are the most common.  The majority of OLTP databases are relational, and relational data modeling is the norm for Data Warehouse databases as well.  Key/value databases have gotten more popular in OLTP applications that involve high frequency “store & retrieve” operations on relatively simple and often dynamic structures.  Key/Value databases (using JSON or XML structures) have the advantage of a non-relational data model that can be quite dynamic.  Time Series databases have emerged with a focus on forecasting.  In-Memory databases deliver high performance, and Property Graph databases are focused on relationship attributes.

Screen Shot 2019-06-11 at 1.32.38 PM

Easy Deployment

In the Cloud, organizations can easily deploy multiple divergent technologies, so does it make more sense to use purpose-built databases in the Cloud?  In an on-premise environment, deploying another database means buying and deploying yet another server.  Some Cloud vendors will also provide operational support or a “managed service” for each database, so why not?

Of course it’s not only a matter of deploying the database itself.  Each divergent database engine will require it’s own client-side drivers to establish connectivity.  Each of those clients will require a tie-in to any centralized Identity Management service as well.

Operational Burden

In years past (and with on-premise data center environments currently), OPERATING multiple purpose-built databases was always a big disadvantage.  Each database engine requires an IT organization to build expertise in that engine, deploy servers and storage to run those databases, as well as secure and maintain them all.  Moving to a Cloud environment, some of the operational burden still falls on the IT organization, even if the database is operated as a “managed service” provided by the Cloud vendor.

Security Burden

Each separate database technology represents yet another technology that needs to be secured.  Each database has a different security model, with it’s own unique capabilities and quirks.  Each database can be expected to have it’s own set of security flaws and bugs that need to be tracked and managed for proper compliance.  Even if the Cloud vendor is responsible for applying security patches, the IT organization needs to be aware of the flaws and making sure vulnerabilities are addressed.  Trust your Cloud vendor, but VERIFY they are taking care of security!

Building Developer Skills

Each divergent database technology requires specialized developer skills.  Developers need to build expertise in the data modeling capabilities, the functional capabilities, and the business theories that are involved.  In the case of analytics, this often includes expertise in statistical analysis such as auto-regressive modeling for time-series forecasting.

Islands of Data

Multiple divergent database technologies results in islands of data that often needs to be integrated.  Movement of data between databases takes time and induces lag.  If operational reports are executed only from a Data Warehouse, those reports will be incorrect until data from the OLTP system reaches the Data Warehouse.

Islands of data become a big problem if it’s sub-divided too much, becoming a series of  data islands.  Deploying multiple read-replicas of data also isn’t always a solution to every situation, since those replicas need to be kept updated.  Read Replicas are a great solution for data with effectivity dates, but a very poor solution for data with frequent updates.

Multiple islands of data ultimately induces delays in data updates across applications, modules, or even micro-services if each is using a separate data store.  The most obvious case is the time-delay induced by ETL processing between OLTP systems and Data Warehouse systems.  The time-delay is fine for long-term analytics, but unacceptable for operational reporting.

Islands of Functionality

Of course each purpose-built database includes a set of specific functionality.  If a key/value database is used for the CUSTOMER ORDERS database, it’s a problem if some relational modeling capabilities are needed in that database.

Key/Value databases have been presented as if they were something new, but are decades old. Key/value databases have always been FAST for ingesting data because they are simply storing a structure in a single “write” (or insert) operation.  Some of the earliest databases used a key/value modeling approach, which becomes extremely cumbersome with highly complex data relationships.  What’s new in key/value is the ability to model data structures using JSON or XML, including the ability to ENFORCE the JSON or XML structural integrity.

All-Inclusive Database Approach

The All-Inclusive database approach puts all of this functionality into a single database engine.  Developers can use ANY of the available functionality within ANY database instead of having to move the data to a place where the functionality resides.  Developers simply use the functionality in-place.

As the following diagram illustrates, Oracle includes ALL of this functionality in a single database engine.  Developers working on an OLTP database can use capabilities of Data Warehouse databases within the same database.  The data doesn’t have to be moved to take advantage of such features.  If data nee

Screen Shot 2019-06-11 at 2.13.39 PM

One Engine, Not One Database!

Notice that this means ONE ENGINE, not one database!  Just because you could put all of your data into a single database doesn’t mean you should.  In fact, you could use separate Oracle databases for each type of data & functionality as follows:

Screen Shot 2019-06-11 at 2.27.49 PM

Of course this approach doesn’t necessarily make sense either.  Nobody does data architecture like this.  Each database is created to handle specific applications or sub-components of an application.  Developers then use whatever functionality makes sense to handle the business needs of that application or sub-component.

Data Architecture

Data Architecture for an organization approaches the problem from the standpoint of business processes and data ownership.  Data architecture should not include limits on data modeling capabilities or limits on how the data can be processed.  Consider the following sample data architecture:

Screen Shot 2019-06-11 at 2.32.15 PM

Notice that Active Data Guard is used for most databases to provide availability, as well as for Read Replicas in the case of the Product Catalog.  Active Data Guard is even used for the ORDERS database, even though it’s a sharded database.  While sharding reduces the failure impact (or “blast area”) of the database, each shard still represents a single source of truth for the range data it contains.

If this data architecture included limitations in functionality, the entire architecture gets much more complex.  For example, the ORDERS database mainly uses key/value data modeling to increase agility into the data model, as well as improving response time.  Submitting an order involves a single WRITE (or INSERT) of a single record that contains a complex JSON structure.  Processing each order means a single READ (or SELECT) of a single row of data containing that JSON structure.  However, if we need a bit of relational functionality within this database, that’s certainly possible.  The main function of the database uses key/value, but developers aren’t limited to just that single data modeling capability.

All-Inclusive in the Cloud

The Oracle database has always been a rather LARGE chunk of code.  It can be hard to install and takes up lots of space.  However, once it’s up and running, Oracle has enormous depth in capability.  My original assumption was that Cloud might tend to favor purpose-built databases.  Of course you will hear that from vendors who lack an all-inclusive database engine of their own.  However, it turns out that Cloud still does favor the All-Inclusive approach.

Islands of data & functionality is still a disadvantage, even in the Cloud.