MANN: Multi-head Attention Network Model for Estimating Cardinality in Multi-model Databases
In database query optimization, cardinality estimation is the key to determine the efficiency of query planning. Traditional methods often encounter accuracy challenges when processing complex queries, prompting researchers to explore machine learning techniques to enhance estimation quality. Numerous studies have shown that machine learning methods can effectively solve the problem of cardinality estimation, but in the field of multi model databases, research on machine learning based cardinality estimation is still in its infancy. This article focuses on the problem of query cardinality estimation on multi model databases and applies a multi head attention mechanism to construct a neural network model, namely Multi head Attention Neural Network (MANN), which can effectively capture complex relationships between tables or predicates, thereby improving estimation accuracy. MANN decomposes query statements into multiple sub query sets based on table names, and normalizes the query features within each set. It uses multi head attention mechanism to train, recognize, and learn the correlations between tables or predicates. This model supports SQL and Arango Query Language (AQL) queries and is suitable for multi model databases such as ArangoDB. Experiments were conducted on the synthetic dataset UniBench and the real dataset IMDb, and the results showed that MANN exhibited higher accuracy and efficiency in handling cardinality estimation problems compared to existing techniques. Its performance was particularly outstanding in handling high predicate relevance queries, with the median error 39% better than existing state-of-the-art methods.
Authors
- Aihua Wu (ORCID: https://orcid.org/0000-0003-0532-5579)
- Ruihai Deng
Institutions
- Shanghai Maritime University (CN)
Publication Details
- Published
- 2024-09-13
- DOI
- https://doi.org/10.1145/3703187.3703270
- Primary Topic
- Data Management and Algorithms
- Type
- article
- Field-Weighted Citation Impact
- 0.00