Terabyte-Scale Analytics in the Blink of an Eye

Bowen Wu, Wei Cui, Carlo Curino, Matteo Interlandi, Rathijit Sen

TL;DR

Researchers from Microsoft and ETH Zurich have demonstrated that distributed GPU clusters, typically reserved for training LLMs, can run complex analytical SQL queries at a massive scale in under a second. By repurposing AI-centric communication libraries (like NCCL), their prototype system, TQP, executed all 22 TPC-H queries on a 1TB dataset in just 0.53 seconds—literally faster than you can blink twice.

What Problem Does This Paper Address?

For decades, the "gold standard" for big data analytics has been clusters of CPU-based machines. While GPUs are incredibly fast at parallel processing, they have historically struggled with SQL at scale due to two "walls":

  1. The Memory Wall: Individual GPUs have limited High-Bandwidth Memory (HBM) compared to the terabytes of RAM available to CPUs.
  2. The Transfer Wall: Moving data between the CPU and GPU (via PCIe) or between different machines (via standard Ethernet) is often so slow that it negates the GPU's raw computational speed.

As AI workloads have exploded, data centers have deployed "super-nodes" (like NVIDIA DGX or AMD MI300X systems) where 8 GPUs are packed into a single box with ultra-fast internal interconnects (NVLink/Infinity Fabric). This paper asks: Can we steal the hardware and software stack built for Generative AI to finally break the bottlenecks of SQL analytics?

Methods

The authors built a distributed version of the Tensor Query Processor (TQP). Instead of writing a database engine from scratch, TQP takes a "non-conventional" approach:

  • SQL as Tensors: It uses the Apache Spark (Catalyst) optimizer to turn SQL queries into physical plans, which are then "tensorized" into programs that run on the PyTorch API.
  • AI Communication Primitives: To move data between GPUs, the system bypasses traditional database networking. Instead, it uses NCCL (NVIDIA) and RCCL (AMD)—the same libraries used to sync weights in massive AI models—to perform "shuffles" and "broadcasts."
  • Analytical Modeling: The team developed mathematical models to predict performance based on interconnect bandwidth and message sizes, helping determine when it's faster to "broadcast" a small table versus "shuffling" a large one.

Datasets

The system was evaluated using:

  • TPC-H: The industry-standard benchmark for decision support systems, tested at Scale Factor 1000 (1TB) and Scale Factor 3000 (3TB).
  • JCC-H: A variant of TPC-H designed to introduce "data skew" (uneven data distribution), which is a notorious performance killer for distributed systems.

Key Insights and Ideas

  • The Interconnect is the Database: The study reveals that for modern analytics, the network is the bottleneck, not the compute. Using InfiniBand (400 Gbits/sec) instead of standard Ethernet (100 Gbits/sec) improved performance by over an order of magnitude.
  • Borrowing from AI Works: By treating SQL rows as tensors and using AI collective communications, the system achieves "seamless portability" between NVIDIA and AMD hardware while benefiting from the massive R&D invested in the AI ecosystem.
  • The "Blink of an Eye" Threshold: The authors emphasize that at sub-second speeds for terabyte-scale data, the paradigm of "waiting for a report" disappears, enabling truly interactive data exploration.
  • Small Messages Matter: Even with massive bandwidth, if a query generates many small data transfers, performance tanks due to protocol overhead. The authors found that "misaligned" memory addresses can also significantly degrade throughput.

Key Results

  • Blistering Speed: Using 40 GPUs (5 machines), TQP ran the entire 22-query TPC-H suite at 1TB in 0.53 seconds. At 3TB, it finished in 1.3 seconds.
  • Massive Speedup: This performance is roughly 60x faster than high-end CPU-only solutions where the data fits entirely in RAM.
  • Comparison: Against DuckDB (a popular CPU-based engine), TQP was two orders of magnitude faster. It also significantly outperformed HeavyDB (a specialized GPU database).
  • Scalability: The system showed near-linear scaling for "shuffle" operations, proving that as you add more GPU nodes with high-speed interconnects, the system continues to get faster.

Limitations and Future Work

  • "Warm" vs. "Cold" Runs: The sub-second results assume data is already loaded into GPU memory. A "cold" run (loading 1TB from disk/CPU) takes about 11.4 seconds. While still fast, the "blink of an eye" claim depends on data residency.
  • Feature Completeness: TQP currently lacks support for certain data types, such as decimals (they are treated as floats), which are critical for financial applications.
  • Query Optimization: The current system requires some manual optimization of query plans. The authors plan to integrate their analytical models into an automated, "statistic-aware" distributed query optimizer.
  • Fault Tolerance: Currently, if a node fails, the query must be re-executed. While acceptable for sub-second queries, longer-running workloads might need more robust checkpointing.

Summary updated

BibTeX
@article{wu2025terabyte,
  author = {Bowen Wu and Wei Cui and Carlo Curino and Matteo Interlandi and Rathijit Sen},
  title = {{Terabyte-Scale Analytics in the Blink of an Eye}},
  journal = {Proceedings of the VLDB Endowment},
  year = {2025},
  doi = {10.14778/3773749.3773754},
}
Figure