[Paper Review] SharedDB: Killing One Thousand Queries With One Stone
SharedDB proposes a novel, batch-oriented database architecture that improves performance and response time guarantees under high concurrency by sharing computation across hundreds of concurrent queries and updates. By batching queries and performing a single, unified execution of overlapping operations—such as a multi-join on shared customer and order data—it achieves up to twice the throughput of a top-tier commercial database and nearly eight times that of MySQL on the TPC-W benchmark, even under unpredictable, mixed workloads.
Traditional database systems are built around the query-at-a-time model. This approach tries to optimize performance in a best-effort way. Unfortunately, best effort is not good enough for many modern applications. These applications require response time guarantees in high load situations. This paper describes the design of a new database architecture that is based on batching queries and shared computation across possibly hundreds of concurrent queries and updates. Performance experiments with the TPC-W benchmark show that the performance of our implementation, SharedDB, is indeed robust across a wide range of dynamic workloads.
Motivation & Objective
- Address the limitations of traditional query-at-a-time database systems in meeting strict service-level agreements (SLAs) under high concurrency.
- Overcome performance degradation and resource contention caused by interference between concurrent queries and updates in existing systems.
- Design a general-purpose database architecture capable of handling diverse workloads—including OLTP, OLAP, and mixed workloads—while maintaining response time guarantees.
- Enable efficient, scalable processing of dynamic, unpredictable query mixes through shared execution and query batching, without requiring manual tuning or load control mechanisms.
Proposed method
- Batch multiple concurrent queries and updates into a single execution plan to enable shared computation across overlapping data access patterns.
- Perform a single, unified join operation on the union of relevant tuples (e.g., German and Swiss customers) to serve multiple queries simultaneously, reducing redundant work.
- Define a worst-case computational upper bound (whole table join) independent of the number of concurrent queries, ensuring predictable performance scaling.
- Adopt and generalize techniques from multi-query optimization and data stream processing (e.g., QPipe, CJoin, DataPath) for broader applicability beyond OLAP workloads.
- Implement a runtime system that dynamically schedules and coordinates shared execution of queries and updates, minimizing per-query overhead.
- Leverage standard relational algebra operators with extensions to support shared execution plans, enabling compatibility with standard SQL and relational operations.
Experimental results
Research questions
- RQ1Can a batch-oriented, shared-computation model outperform traditional query-at-a-time systems under high-concurrency, mixed-workload scenarios?
- RQ2To what extent can shared execution reduce redundant computation across hundreds of concurrent queries with overlapping access patterns?
- RQ3How does SharedDB maintain low latency and high throughput without requiring load control or query prioritization mechanisms?
- RQ4Can the shared computation model be generalized to support both OLTP and OLAP workloads, including frequent small updates and complex analytical queries?
- RQ5What is the scalability ceiling of shared execution when query predicates vary widely and perfect sharing is not achievable?
Key findings
- SharedDB sustains up to twice the throughput of a top-of-the-line commercial relational database system and nearly eight times that of MySQL on the TPC-W benchmark under high load.
- The system maintains robust performance even when mixing light queries (e.g., 'search item by title') and heavy queries (e.g., 'best sellers'), with no degradation in response time for light queries.
- Throughput increases monotonically with the number of concurrent queries due to growing sharing opportunities, demonstrating strong scalability under dynamic workloads.
- SharedDB outperforms MySQL and a commercial system by a factor of 3 in extreme workloads, even when the competing systems experience throughput collapse.
- The system’s performance is stable and predictable across different hardware configurations and query diversity levels, confirming its robustness in real-world scenarios.
- Despite per-query overheads limiting perfect scaling, SharedDB achieves significantly better scalability than traditional systems, especially in mixed, unpredictable workloads.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.