Expired Oracle Patent Clears Path For Faster Sorting In MySQL And PostgreSQL – Open Source For You

Expired Oracle Patent Opens High-Performance Database Sorting To Open Source Ecosystems

Unlocking Performance with Orasort

A production-proven Oracle sorting algorithm with claimed 5× performance gains is now public domain, enabling MySQL, PostgreSQL, and other open source databases to adopt it freely and accelerate performance without architectural changes.

The expiration of Oracle’s patent US7680791B2 has paved the way for open-source databases to leverage a high-performance sorting algorithm that was previously constrained by intellectual property limitations. This patent, which details a rapid method for sorting database keys, has now transitioned into the public domain, effectively eliminating licensing hurdles for open-source implementations.

Known informally as “Orasort,” this algorithm was developed by Mark Callaghan during his tenure at Oracle and was initially included in Oracle Database 10gR2. It was specifically engineered to enhance sorting workloads that involve similar keys with shared prefixes—a frequent occurrence in database systems.

Orasort incorporates several innovative optimizations:

  • Skipping repeated comparisons of common prefix bytes
  • Adaptively switching between quicksort and radix sort
  • Caching key substrings to minimize CPU cache misses
  • Prefetching data to reduce unnecessary memory access
  • Producing partial results before the entire sort is completed to lower latency

According to Callaghan, the algorithm achieved approximately five times faster in-memory sorting compared to Oracle’s previous methods and performed favorably against commercial alternatives. “The new sort was often about five times faster than the old sort,” he remarked, highlighting its robust performance within Oracle’s database management system.

With the patent’s expiration, the database community has rapidly expressed interest in integrating Orasort into MySQL, PostgreSQL, and various other open-source engines. The clarity and accessibility of the patent documentation further facilitate this transition. Early experimentation has already commenced, with Hannu Krosing, a database engineer at Google, exploring implementations in Python, C, and C++ utilizing AI tools such as Gemini.

While Oracle retains a portfolio of over 52,000 patents, this particular expiration is noteworthy for releasing a fundamental database performance primitive rather than a mere ancillary feature, thereby fostering new avenues for innovation within the open-source landscape.

Tech Optimizer
Expired Oracle Patent Clears Path For Faster Sorting In MySQL And PostgreSQL - Open Source For You