Query Optimization : A Metaheuristics Approach Using Modified Memetics Algorithm (MMA)

The more complex business process of a system, the greater data that is stored. Increase of data transactions has an impact on a system performance. Therefore it is needed to optimize the query processing on data storage to maintain and improve the system performance. A memetics algorithm (MA) is a population-based metaheuristics approach which is the development of traditional genetics algorithms (GA) combined with local search (LS) technique. By using tabu search (TS) technique on the crossover operation in GA, this research proposes the modified memetics algorithm (MMA) for query optimization. The result shows that the processing time of the optimized (MMA) query is faster than the unoptimized query.


Introduction
Most of systems need the data storage. Database is a form of data storage which widely used by most of systems because the ability to link between the data and is easier to develop. In general, the more complex business process of a system, the greater data that is stored. Increase of data transactions have an impact on system performance. In this condition, the query as extracting data from a database must be optimized for processing. Query processing optimization aims to maintain and improve system performance.
A memetics algorithm (MA) as one of the optimization algorithms is an extension of the traditional genetics algorithm. It uses a local search technique to reduce the likelihood of the premature convergence. MA are population-based metaheuristics approach. This means that the algorithm maintain a population of solutions for the problem at hand, i.e. a condition comprises several solutions simultaneously.

Method
In this research, the proposed modified memetics algorithm (MMA) is built from the combination of genetics algorithm (GA) and tabu search technique. On genetics algorithm there are selection, crossover and mutation operation to produce a new individual (solution). In this research, the tabu search technique applied on the crossover operation.

Results and Discussions
In this research, the query processing use relations of three tables that is table khs, table mhsw and table tahun as shown in Figure 1.  Figure 1, the join of the tables can be made in this form : ( m ⋈ k) and (k ⋈ t) To implement the MMA on this case of query optimization, the initialize population is defined by permutation method. The number of population is 6 (popsize=6). The fitness value is calculated using cost-model approach. By using the relation size of tables, the fitness value is obtained. It is shown in Table 1. Evaluating query plan aims to determine what are the result has already in the optimal condition. The roulette selection strategy, crossover and mutation operation is used to get a new chromosome/solution (called the optimal query plan).  Implementing tabu search technique on the crossover operation aims to avoid that the search returns to previously visited solutions. This research use the number of tabu list = 2. The tabu search process give results a tabu crossover chromosome as seen on Table 2. For mutation probability is pm = 0,25, then is obtained the number of mutation = 0,5. The chromosome is selected to have a mutation if the random value generated is smaller than the number of mutation. From Table 2, the result of mutation operation shows that chromosome k t m is mutated.
To illustrate the result of the proposed MMA, the query used is the one below : The processing of the unoptimized query and the MMA query give each result 17391 tuples. The processing time of each query is shown in Table 3. The experiment of each query processing are performed in five times, i.e. T1, T2, T3, T4 and T5 in a seconds.  Table 3 can be seen that the processing time of the unoptimized query > the MMA query. This means that the processing time of the MMA query is faster than the unoptimized query.

Conclusion
The query processing optimization on data storage is done to maintain and improve the system performance. By using tabu search (TS) technique on the crossover operation in genetics algorithm (GA), it can be developed the modified memetics algorithm (MMA) as metaheuristics approach for query optimization. This optimization is seen in faster query processing time. The processing time of the optimized (MMA) query is 0,08 seconds faster than the processing time of the unoptimized query.