TPUs accelerate large scale analytical queries with high speed
The Case for TPU-Accelerated Analytical Query Processing
Databases
Summary
Handling very large analytical database queries needs powerful hardware that can easily grow to handle more data. The authors show that TPUs, which are specialized chips usually used for AI tasks, can also speed up these database queries significantly. They built software that rewrites typical database operations to run efficiently on TPUs, overcoming some of their usual limitations. Their tests show that using TPUs can make these queries run many times faster than traditional CPU-based systems.
What this means in practice
- •For cloud infrastructure teams: Deploy TPU-based systems to speed up large-scale analytical query workloads beyond traditional CPU clusters.
- •For financial data analysts: Process massive business intelligence queries faster by using TPU-accelerated database engines for improved performance.
Authors
Yeounoh Chung, Jaehyun Ha, Helena Caminal, Fatma Ozcan, Aditya K Kamath, Arvind Krishnamurthy, Henry M. Levy
Abstract
Large-scale analytical query processing requires computing substrates capable of immense distributed scale-out. Tensor Processing Units (TPUs) perfectly embody this extreme-scale architecture, offering massive computational density and highly scalable optical pod-level interconnects. Despite these advantages, TPUs have so far remained largely unexplored for analytical database workloads. In this paper, we present the first comprehensive case for TPU-accelerated analytical query processing by running all the TPC-H queries entirely on the TPUs. We introduce Native TPU Accelerator (NTA) for analytical query processing, which provides hardware-conscious algorithm design and optimizations in JAX/XLA. By exposing the TPU's structural mechanics, we demonstrate how dynamic, memory-bound database operations can be rewritten into deterministic JAX programs. We engineer a suite of novel execution strategies that leverage both the TPU's TensorCore and SparseCore to trade sparse, unpredictable memory accesses for dense, hardware-aligned ones. At the core of NTA, a compiler uses catalog statistics to assign guarded static capacities and a hardware-calibrated local cost model to select a TPU-native implementation for each relational operator before JIT compilation. We evaluate our system using the TPC-H benchmark. Taking full advantage of TPU slices and JAX distributed computing, we seamlessly scale our execution environment to run TPC-H benchmark up to Scale Factor 1000 (SF1000). Evaluated against a rigorous CPU ground truth (DuckDB), our native TPU accelerator achieves state-of-the-art performance, achieving a 7.0x single-device speedup over DuckDB at SF100 and a 68.6x speedup with 16 TPUs at SF1000 (1TB). The results establish TPUs not merely as dense neural compute hardware, but as a highly competitive, massively scalable substrate for the next generation of analytical query processing.