## 3 System Implementation and Performance Evaluation
### Performance Index  
In order to evaluate the performance of the several approaches proposed in this paper, the performance index (PI) [27] was derived from first measuring an average access time in any specified environment with a variety of commands for a certain approach using Equation (1), next calculating weighted average access time in any specified environment with various data size in the files using Equation (2), then inducing a normalized performance index according to all of environments among the approaches using Equation (3), and finally resulting in the performance index according to different tests using Equation (4). In these equations, the subscript \(\mathbf{s}\) indicates the index of the testing SQL  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Command** & **Function** \\ \hline sql [sql\_cmd] & Enter a SQL query command \\ stat & Displays the current cluster status \\ flush & Clear all in-memory cache \\ purge [days] & Clear part of cache that are not accessed in a number of days \\ display [on l off] & Turn on/off to display search results \\ enforced [name l autol] & Forced to use a specific tool (Hive, Impala, or SparkSQL) \\ \hline \hline \end{tabular}
\end{table}
Table 4: A list of instructions for a command line interface in system.  
Figure 14: UML diagram of the code architecture.  
command, the subscript \(i\) denotes the index of the testing file, \(j\) denotes the index of the testing environment, and \(k\) denotes the index of the testing approach. Equation (1) calculates the average access time \(\mathbf{AAT_{ijk}}\) for each testing file with various commands. In Equation (1), \(\mathbf{AAT_{sijk}}\) represents the average access time for a certain SQL command and a certain data file, and \(\mathbf{N_{command}}\) represents the number of SQL commands we applied. Equation (2) calculates the average access times \(\overline{\mathbf{AAT_{jk}}}\) over the different data files, in which \(\mathbf{AAT_{ijk}}\) represents average access time for a certain data file, as given in Equation (1). Equation (3) calculates the normalized performance index for a specific testing environment. Equation (4) calculates the performance index (PI) for a specific approach, \(\mathbf{SF_{1}}\) is a scaling factor that aims to quantify the value for observation.  
\[\mathbf{AAT_{ijk}}=\frac{\sum\limits_{s=1}^{r}\mathbf{AAT_{sijk}}}{\mathbf{N_{command}}}, \text{\emph{where}}\ \mathbf{s}=\mathbf{1},\mathbf{2},\ldots,\mathbf{r},\ \mathbf{i}=\mathbf{1},\mathbf{2},\ldots,\mathbf{l},\ \mathbf{j}=\mathbf{1},\mathbf{2},\ldots,\mathbf{m},\ \mathbf{k}=\mathbf{1},\mathbf{2},\ldots,\mathbf{n} \tag{1}\]  
\[\overline{\mathbf{AAT_{jk}}}=\sum\limits_{i=1}^{l}!_{i}\cdot\mathbf{AAT_{ijk}},\ \text{\emph{where}}\ \mathbf{j}=\mathbf{1},\mathbf{2},\ldots,\mathbf{m},\ \mathbf{k}=\mathbf{1},\mathbf{2},\ldots,\mathbf{n},\ \sum\limits_{i=1}^{l}!_{i}=\mathbf{1} \tag{2}\]  
\[\overline{\mathbf{PI_{jk}}}=\frac{\overline{\mathbf{AAT_{jk}}}}{\mathbf{MAX}\begin{pmatrix} \frac{1}{\mathbf{AAT_{kk}}}\\ \mathbf{MAX}=\mathbf{1},\mathbf{2},\ldots,\mathbf{m}\end{pmatrix}},\ \text{\emph{where}}\ \mathbf{j}=\mathbf{1},\mathbf{2},\ldots,\mathbf{m},\ \mathbf{k}=\mathbf{1},\mathbf{2},\ldots,\mathbf{n} \tag{3}\]  
\[\mathbf{PI_{k}}=\left(\sum\limits_{k=1}^{n}\ \mathbf{W}_{j}\overline{\mathbf{PI_{jk}}} \right)\cdot\mathbf{SF_{1}},\ \text{\emph{where}}\ \mathbf{j}=\mathbf{1},\mathbf{2},\ldots,\mathbf{m},\ \mathbf{k}=\mathbf{1},\mathbf{2},\ldots,\mathbf{n},\ \mathbf{SF_{1}}=\mathbf{10^{2}},\ \sum\limits_{k=1}^{n}\ \mathbf{W}_{k}=\mathbf{1} \tag{4}\]