{'fraction_non_alphanumeric': 0.014519056261343012, 'fraction_numerical': 0.0, 'mean_word_length': 4.690721649484536, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards Empirically Driven Query Optimization

Query optimization is a hard problem with exponential complexity. In this paper, we analyze the properties of query plans generated by a DBMS. Using these as plan logs, we discover the least cost plan for a new query. We developed a framework which collects statistics from the plans returned by the query optimizers and uses a distance function to select the least cost plan for a new query. The experimental results validate our approach by selecting near-optimal plans for a given set of test queries.