A Novel Approach to Reduce the Financial and Computational Costs of Similarity Queries over Document Collections in NoSQL Databases
摘要
Several cloud-based NoSQL data stores, such as Firestore and MongoDB, organize data into document collections. However, they offer limited resources for querying complex data by similarity. The comparison conditions available for documents are restricted to identity, containment, or order relationships. Thus, executing a similarity query often requires scanning the entire collection. This approach can be costly both computationally and financially, as data storage licenses often charge based on the number of document reads and writes. This paper presents Similarity-Slim, an innovative extension for NoSQL databases aimed at reducing the financial and computational costs of similarity queries. The extension includes two novel post-processing algorithms: Slim-Replace and Slim-Bloat, which theoretically can be applied to any metric tree. The effectiveness of Similarity-Slim was evaluated using Firestore as a case study, covering three application scenarios: geospatial data, image recommendation, and medical support systems. Experimental results demonstrate that Similarity-Slim can reduce costs by up to three orders of magnitude and accelerate query performance by up to two orders of magnitude.