Abstract
Nowadays, query optimization has been highly concerned in big data management, especially in NoSQL databases. Approximate queries boost query performance by loss of accuracy; for example, sampling approaches trade off query completeness for efficiency. Different from them, we propose an uncertainty of query completeness, called Probability of query Completeness (PC). PC refers to the possibility that query results contain all satisfied records. We trade off PC for query performance, and experiments show that a small loss of PC doubles query performance. The proposed Probery (PROBability-based data quERY) adopts the uncertainty of query completeness to accelerate OLTP queries. This paper illustrates the data and probability models, the probability-based data placement and query processing, and the Apache Drill-based implementation of Probery.
Introduction
In big data management, query performance is a critical bottleneck. While traditional optimizations like indexing and partitioning are effective, they become increasingly expensive to maintain as data volume grows. Approximate Query Processing (AQP) techniques, such as sampling, typically focus on the accuracy of aggregated results but do not address the completeness of result sets for range or point queries.
Probery addresses this by introducing the concept of Probability of query Completeness (PC). For many real-world applications—such as finding nearby restaurants or exploring massive log files—a user might prefer a near-instant result that is 95% complete over a perfectly complete result that takes significantly longer. The challenge lies in mathematically guaranteeing this completeness without scanning the entire dataset.
Methodology
Probery's core innovation is a "Probability-based Incomplete Query" approach that maps logical data to physical storage using a non-uniform probability distribution.
Logical to Physical Mapping
Data is organized into a multi-dimensional "Table Space" divided into cells. These cells are then placed into physical blocks based on a predefined probability distribution. Unlike traditional systems where a record's location is deterministic or hashed, Probery uses a Probability of Placement (PP) matrix. This ensures that for any given cell, the system knows the probability that its data exists in any specific physical block.
Query Processing: The H-Selection Algorithm
When a query is issued with a user-defined PC threshold (e.g., PC=0.9), Probery employs a heuristic selection algorithm. It calculates which blocks are most likely to contain the required data and skips those with a low "Probability of Existence" until the cumulative probability meets the user's confidence threshold. This "deterministic randomness" allows Probery to prove mathematically that skipping certain blocks satisfies the requested confidence level without needing massive, costly indexes.
Implementation
Probery is implemented as a layer on top of Apache Drill and HDFS. It acts as a proxy that optimizes the scan mechanism of the host engine by generating tasks only for the most probable blocks.
Experimental Evaluation
The authors evaluated Probery using a synthetic dataset (20M to 100M records) to validate the probability models and the UserVisits benchmark (up to 80GB) for performance comparison against industry-standard "SQL on Hadoop" engines.
Key Results
- Performance Gains: A small loss in completeness (e.g., PC = 0.95) can double query performance compared to a full scan.
- Comparative Speed: In incomplete query scenarios, Probery outperformed Apache Drill by 1.8x, Impala by 1.3x, and Hive (on Tez) by 1.6x.
- Scalability: Probery exhibits sub-linear scalability, maintaining its performance advantage as datasets grow. It often outperforms in-memory solutions like Impala when data volume exceeds available memory.
Conclusion and Future Work
Probery demonstrates that trading a small, quantifiable amount of completeness can yield massive performance gains in big data environments. Currently, the system focuses on optimizing scan operations for key-value oriented NoSQL data. Future work includes investigating more sophisticated data structures for the table space, adapting the model to complex relational schemas, and integrating Probery with other popular query engines like SparkSQL.
Summary updated