Department
of Information Technology, Uppsala University
Box 337, SE-751 05, Sweden
thanh.truong@it.uu.se
tore.risch@it.uu.se
To enable historical analyses of logged data streams by SQL queries, the Stream Log Analysis System (SLAS) bulk loads data streams derived from sensor readings into a relational database system. Queries over such log data often involve complex numerical conditions containing inequalities, e.g. to find suspected deviations from normal behavior based on some function over measured sensor values. However, such SQL queries are often slow to execute, because the query optimizer of the DBMS is unable to utilize ordered indexed attributes inside numerical conditions. In order to speed up those queries they often need to be reformulated to utilize available indexes. In SLAS the query transformation algorithm AQIT (Algebraic Query Inequality Transformation) automatically transforms SQL queries involving a class of algebraic inequalities into more scalable SQL queries utilizing ordered indexes. The experimental results show that the queries execute substantially faster by the DBMS when AQIT has been applied to pre-process historical queries involving typical numerical expressions to analyze logged data streams.