Genetic Algorithm Index Selection for Database Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Finding an efficient or optimal index configuration for a database is computationally challenging due to the enormous number of possible configurations, especially with hundreds of tables and thousands of SQL statements, leading to time and resource-intensive searches.
Innovation Solution
The use of a genetic algorithm to efficiently search for index configurations by mimicking natural evolution processes, including inheritance, mutation, and selection, to optimize the fitness of index configurations, with virtual indexing to simulate building indexes and improve performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional exhaustive search methods are used to find optimal index configurations, then the completeness of the search is improved, but the time and computational resources required increase enormously
Solution Approach 1:
The patent replaces traditional mechanical exhaustive search with a genetic algorithm that uses biological evolution principles. The system encodes index configurations as chromosomes and uses selection, crossover, and mutation operators to evolve optimal solutions, substituting the mechanical brute-force approach with a biologically-inspired stochastic search that achieves both completeness and efficiency
Solution Approach 2:
The patent changes the search parameters from traditional exhaustive enumeration to a population-based evolutionary approach. By representing index configurations as genetic chromosomes and using fitness functions to evaluate performance, the system transforms the search problem into an optimization problem that can be solved more efficiently through evolutionary computation
2Speed
If more indexes are created to improve database performance, then query execution speed is improved, but the complexity of index management increases
Solution Approach 1:
The patent implements self-service by enabling the database system to automatically generate, evaluate, and manage indexes without human intervention. The genetic algorithm autonomously explores the search space of possible indexes, evaluates their performance using fitness functions, and selects optimal configurations, freeing database administrators from manual index management tasks
Solution Approach 2:
The patent incorporates feedback mechanisms where the fitness function continuously evaluates index configurations based on query performance metrics. This feedback loop allows the genetic algorithm to learn from the results of index evaluations and iteratively improve the population of candidate indexes, leading to automated optimization of database performance
3Measurement precision
If virtual indexing is used to simulate index building, then the accuracy of performance prediction is improved, but the computational overhead of simulation increases
Solution Approach 1:
The patent applies preliminary action by using virtual indexing to simulate and predict the performance impact of potential indexes before actually creating them in the database. This allows the genetic algorithm to evaluate candidate indexes in advance using cost models that estimate query performance, avoiding the need to physically build and test every possible index configuration
Data Source
AI summary
Systems and methods are disclosed that utilize a genetic algorithm to search for an index configuration for a collection of data such as, e.g., a database. Genetic algorithms can include stochastic search heuristics that mimic processes of natural evolution including inheritance, mutation, crossover, and selection. A population of chromosomes representing candidate index configurations can evolve to increase or optimize the fitness of the population and to identify the best (e.g., most fit) index configuration. Fitness of a chromosome may be measured based at least in part on the cost of computer resources used for executing Structured Query Language (SQL) statements in the indexed database. In various implementations, virtual indexing may be used to simulate building an index, chromosomes may be encoded using non-bitmapped representations of index configurations, chromosomes may include genes representing a column in a table in a database, dropping an index from a table in a database, or a composite index for a database, and/or a participation pool may be used to select fitter genes for an initial population of chromosomes.


