1. Similarity Metrics for SQL Query Clustering
- Author
-
Gokhan Kul, Shambhu Upadhyaya, Varun Chandola, Duc Thanh Anh Luong, Oliver Kennedy, and Ting Xie
- Subjects
SQL ,Information retrieval ,Computer science ,Database schema ,InformationSystems_DATABASEMANAGEMENT ,Database administrator ,02 engineering and technology ,Automatic summarization ,Database tuning ,Computer Science Applications ,Set (abstract data type) ,Computational Theory and Mathematics ,Similarity (network science) ,020204 information systems ,0202 electrical engineering, electronic engineering, information engineering ,020201 artificial intelligence & image processing ,Heuristics ,Cluster analysis ,computer ,Information Systems ,computer.programming_language - Abstract
Database access logs are the starting point for many forms of database administration, from database performance tuning, to security auditing, to benchmark design, and many more. Unfortunately, query logs are also large and unwieldy, and it can be difficult for an analyst to extract broad patterns from the set of queries found therein. Clustering is a natural first step towards understanding the massive query logs. However, many clustering methods rely on the notion of pairwise similarity, which is challenging to compute for SQL queries, especially when the underlying data and database schema is unavailable. We investigate the problem of computing similarity between queries, relying only on the query structure. We conduct a rigorous evaluation of three query similarity heuristics proposed in the literature applied to query clustering on multiple query log datasets, representing different types of query workloads. To improve the accuracy of the three heuristics, we propose a generic feature engineering strategy, using classical query rewrites to standardize query structure. The proposed strategy results in a significant improvement in the performance of all three similarity heuristics.
- Published
- 2018
- Full Text
- View/download PDF