Speculative Query Support for RDBMS with Flexible Query Order and Benefit Verification
摘要
This paper discusses the implementation and performance of speculative query execution for relational databases through dynamic analysis of incoming user query streams. A middleware known as the Speculative Layer employs a particular multigraph representation for groups of successive input queries called the Speculation Window which is used to create and execute speculative queries in advance. The speculatively obtained results are applied when executing user queries. This paper introduces a new strategy for managing queries within the Speculation Window. Depending on the availability of results from executed speculative queries, the order of user queries within the Speculation Window can be adjusted. When a user query is to be executed without speculative support, we choose to postpone it in favour of executing one of the subsequent user queries. This decision is made with the anticipation that the speculative results obtained soon will benefit the delayed query. Experiments conducted in a multithreaded environment with SQLite database, show that the new flexible execution strategy reduces the number of user queries executed without the speculative support. Additional series of experiments verifies that the certain parameters describing the speculative support system such as Speculation Window size or length of allowed query execution delay are properly chosen.