Introducing EDB Postgres® AI - GPU Acceleration with NVIDIA RAPIDS Accelerator for Apache Spark
Analytics in the Agentic Workforce Era
EDB’s Sovereignty Matters research shows that only 13% of enterprises have successfully moved beyond generative AI pilots into production-scale agentic deployments, highlighting the challenge of scaling autonomous work.
A key challenge these enterprises face in the era of agentic workforce: database management is hitting a wall. Autonomous AI agents generate continuous, massive-scale query patterns that are far more volatile and unpredictable than human-driven workloads. This shift puts immense pressure on infrastructure teams to balance OLTP (transactional) and OLAP (analytical) demands simultaneously.
The resulting increase of costly "extract, transform, load" (ETL) processes creates several critical "anti-patterns":
- Latency & Overhead: Moving data between systems delays insights.
- Complexity: Managing heterogeneous data systems increases technical debt.
- Stalled Progress: These inefficiencies block the real-time, interactive decision-making required by AI agents.
EDB Postgres AI (EDB PG AI) breaks these barriers by unifying operational and analytical intelligence into a single, scalable platform. It simplifies the stack for enterprise developers and ensures that whether the "user" is a human, an app, or an AI agent, the data is accessible and ready in near-real time.
Accelerating Insights with NVIDIA GPU Acceleration
By integrating NVIDIA RAPIDS Accelerator for Apache Spark with GPU acceleration, PG AI moves beyond the limitations of CPU-bound processing. This delivers:
- Near Real-Time Decisioning: Processing operational data at speeds previously impossible with Postgres.
- Higher GPU ROI: Enterprises can leverage GPU investments for the data and analytics layer, rather than just model serving.
- Seamless Scalability: Eliminating the constraints that once slowed down agentic workloads.
This blog demonstrates how EDB Postgres AI - Analytics Accelerator (PGAA) integrates with Apache Spark using NVIDIA RAPIDS Accelerator for Apache Spark. With this new integration, EDB Postgres offloads analytical queries to GPU cores—achieving up to 100x faster, predictable analytics on large datasets with zero code changes. This capability makes EDB Postgres AI the sovereign AI foundation that enterprises need to scale agentic analytics.
This guide is designed for:
- Data Engineers and Developers looking to eliminate performance bottlenecks for agentic workloads with a mix of OLTP and OLAP query patterns.
- Data Leaders seeking a sovereign, cost-effective way to scale analytics and AI infrastructure while maintaining complete control over their agentic data layer
In the sections that follow, we'll explore how EDB Postgres AI leverages spark-rapids to transform analytical performance. First, we'll examine the integration architecture that enables GPU-accelerated query processing. Then, we'll dive into comprehensive TPC-DS benchmark results that demonstrate the dramatic performance gains achievable with GPU acceleration. Finally, we'll discuss why this capability is becoming essential for enterprises navigating the demands of agentic workflows—where AI agents require instant access to both transactional and analytical data at unprecedented scale.
How PGAA and NVIDIA Spark RAPIDS work together to accelerate Postgres queries
“Enterprises want GPU acceleration, but they also need predictability and control. NVIDIA RAPIDS Accelerator for Apache Spark with Iceberg support lets us offload heavy analytics to GPUs while EDB PG AI provides workload isolation, governance, and a consistent operational model. That is the difference between impressive demos and durable production systems.”
— Quais Taraki, CTO, EDB
GPU acceleration is a computing technique that offloads data-intensive tasks from the Central Processing Unit (CPU) to the Graphics Processing Unit (GPU). While a CPU is optimized for complex sequential logic, a GPU consists of thousands of smaller, specialized cores designed for massive parallelism. This allows the GPU to handle thousands of similar tasks simultaneously, such as matrix operations and large-scale data transformations.
Traditionally, a distributed data processing framework, like Apache Spark relies on CPU cores for execution. However, as data scales, the CPU becomes a bottleneck. GPU acceleration in Spark allows the engine to delegate heavy-duty SQL operations (like joins and aggregations) to the GPU, improving query completion times by up to 7x compared to CPU-only environments. NVIDIA RAPIDS Accelerator for Apache Spark is a Spark plug-in maintained by NVIDIA that accelerates Spark query processing using GPUs.
EDB PostgreSQL Analytics Accelerator (PGAA) is a proprietary extension for PostgreSQL developed by EDB. It offloads queries on datasets in popular data lake formats (Delta, Apache Iceberg, Apache Parquet) to an external analytics query engine such as Seafowl (based on Apache DataFusion) or Apache Spark (using Spark Connect).
When PGAA is configured to offload queries to Spark, a "Separation of Storage and Compute" architecture is established, wherein PostgreSQL manages the interface and metadata layer, while the Apache Spark cluster executes computationally intensive operations.
The figure below shows the logical architecture of PGAA offloading query execution to a GPU-accelerated Spark cluster with RAPIDS enabled.
The Spark Connect service above acts as the interface between Postgres and the Spark cluster, using the modern Spark Connect protocol to submit query plans.
Configuring PGAA to offload query execution to Spark is straightforward—just set a few Postgres GUCs (Grand Unified Configuration variables) like this:
SET pgaa.executor_engine = 'spark_connect';
set pgaa.spark_connect_url = 'sc://<spark-connect-host>:15002';
SELECT pgaa.spark_sql('SELECT version()');Measuring Performance: TPC-DS Benchmark Analysis
We recently ran a comparative performance benchmark between PostgreSQL and PGAA, measuring their ability to execute the standard TPC Benchmark™ DS (TPC-DS) Power Tests for analytical processing and decision support.
This TPC-DS benchmark was tested on several setups, measuring query execution speed and latency across various scale factors. PGAA was configured to send queries to a Spark Connect endpoint (Spark 3.5.6) with spark-rapids 25.10 installed, offloading analytical PostgreSQL queries to two variants of Apache Spark: vanilla Spark and Spark configured with the spark-rapids.
The three setups were:
- Vanilla PG18 (tuned): This setup ran queries against PostgreSQL 18 heap tables, with extra indexes created to optimize the system for TPC-DS queries.
- PG18 with EDB PGAA + Spark: This setup ran queries against PostgreSQL 18, which leverages PGAA with a Docker Compose Spark cluster configured to use CPUs only.
- PG18 with EDB PGAA + Spark RAPIDS: This setup ran queries against PostgreSQL 18, which leverages PGAA with a Docker Compose Spark cluster using the spark-rapids plugin 25.10 and specific Spark configurations.
For detailed benchmark results, you can refer to the official report. In summary, PGAA with spark-rapids outperformed PostgreSQL transactional tables on datasets of 100GB, 1TB, and 3TB (scale factors 100, 1000, and 3000), completing the full workload 50–100 times faster.
At lower dataset sizes (100GB-1TB), most acceleration comes from PGAA offloading analytical queries to Spark, with spark-rapids providing an additional 2x-4x improvement over vanilla Spark. At 3TB and above, GPU acceleration with spark-rapids becomes the dominant factor, delivering 7x-14x speedup over vanilla Spark.
At 100GB, PGAA with spark-rapids outperforms vanilla PostgreSQL on 82 of 99 TPC-DS queries. At 1TB, spark-rapids is faster on 91 of 99 queries, with a median speedup of 14.2x, while 9% of PostgreSQL queries fail to complete within 2 hours.
This performance gap widens significantly at 3TB: the median query achieves a 33x speedup with spark-rapids over PostgreSQL, 15 queries time out on PostgreSQL after 2 hours, and the slowest spark-rapids query completes in just 5 minutes.
While we did not run the benchmark suite against PostgreSQL on the RTX Pro 6000 system, we observed a speedup of 1.5x-4.6x in spark-rapids on this system over spark-rapids on the L40S system. The sweet spot is a dataset size of 3TB: at this scale factor, the RTX Pro 6000 outperforms the L40S system by 4.6x and the CPU-only execution on the same system by 14.8x.
Why Enterprises Need GPU Acceleration
Today, databases must handle not only ad-hoc queries from users and applications, but also serve agentic systems with live enterprise data in real time—from transactional records to historical datasets. New agentic use cases query and synthesize terabytes of data in seconds rather than hours, supporting conversational analytics, real-time decisioning, and multi-agent orchestration—without duplicating data across warehouses and lakes or incurring runaway token costs.
Traditional CPU-based architectures handle tasks sequentially. While multiple CPU cores offer increased parallelism, there's a limit to how cost-effectively you can scale them, particularly for computationally intensive workloads.
GPU acceleration offers a transformative solution by leveraging massive parallelism to deliver orders-of-magnitude improvements in speed—often completing tasks in minutes that previously took days. Beyond raw performance, GPUs provide substantial business value through:
- Cost Efficiency: While GPUs have higher upfront costs, their ability to process data faster can reduce ongoing operational expenses and the need for massive, energy-hungry CPU clusters.
- Scalability: Organizations can seamlessly manage 100x more data capacity without sacrificing query performance as their datasets grow.
- Unified Workflows: GPU-accelerated environments allow data engineering and machine learning workloads to coexist on a single platform, reducing operational complexity.
EDB Postgres AI: A Sovereign and Comprehensive Platform
Beyond just analytics acceleration, EDB PG AI provides the comprehensive, sovereign deployment option for secure enterprise operations. This includes critical features that enable the shift from experiments to production-scale agentic workforces:
- NVIDIA NIM model serving: Optimized on-prem inference for models such as Llama 3 and Nemotron.
- High-speed RAG: Accelerated via NVIDIA NeMo Retriever for superior retrieval performance.
- Fully air-gapped support: Ability to import containers and models into private registries and storage, ensuring complete data sovereignty.
Why It Matters to Postgres Professionals
Our benchmark results highlight the costs of tuning PostgreSQL for analytics workloads. This process is time-consuming and challenging—as evidenced by some queries being slowed down by indexes—making it difficult to optimize PostgreSQL for general-purpose analytics use cases.
In contrast, EDB PGAA requires minimal configuration out of the box and no index tuning. It also allows them to remain within the familiar, SQL-compliant environment they already trust. Professionals can "turbo-charge" existing investments without rewriting code or undergoing extensive migrations. This integration enables Postgres to handle high-throughput, parallelizable analytical workloads that were previously offloaded to disparate, specialized data warehouses, effectively eliminating "data silos" and reducing the "Postgres Tax" on complex analytics.
Get hands-on with GPU-accelerated Postgres data analytics
For hands-on experience with GPU-accelerated queries on Postgres, we've created a companion GitHub repository with a ready-to-deploy Docker Compose stack. It includes EDB Postgres and a Spark cluster configured for GPU environments like NVIDIA Brev. The repository provides step-by-step instructions to help you configure and run your first GPU-accelerated analytical queries in minutes.
You can deploy this stack either locally or on GPU infrastructure with minimal setup. The only requirement is an EnterpriseDB subscription token, which you can obtain by signing up for a free trial at enterprisedb.com.
Ready to dive deeper?
Read this technical blog and head over to our GitHub repository to clone the Docker Compose files and run GPU-accelerated Postgres queries.