SQL query space and time complexity estimation for multidimensional queries. (1st December 2008) - Artail, Hassan; El Amine, Hadi; Sakkal, Fehmi
This paper tackles the issue of estimating database query space and time complexities. Initially, queries without joins are considered and classified into five categories in accordance with complexity (type and number of clauses) in a progressive manner. The storage space and execution time complexity measures for each category are then derived after translating the queries into their algebraic representations and then deriving possible relations that accounts for the different factors (i.e., clauses found in the statement). Joins were then considered and similar complexity expressions were derived. Some experiments were carried out against a database of four tables that were populated using a data generation tool, and involved monitoring the execution time with the aid of a performance monitoring software, so as to give insights into the 'join' costs. It is shown that the obtained trends exhibit general agreement with the theoretical expressions for both space and time complexity.