We consider data-visualization systems where data is stored in a database, and a middleware layer translates a frontend request to a SQL query to the database to compute visual results. We focus on the problem of handling visualization requests with predetermined time constraints. We study how to rewrite the original query by adding hints and/or conducting approximations so that the total time is within the time constraint. We develop a novel middleware solution called Maliva, which adopts machine learning (ML) techniques to solve the problem. It applies the Markov Decision Process (MDP) model to decide how to rewrite queries and uses training instances to learn an agent that can make a sequence of decisions judiciously for an online request. Our experiments on both real and synthetic datasets show that compared to the baseline approach that relies on the original SQL query, Maliva performs significantly better in terms of both the chance of serving requests interactively and query execution time.
翻译:我们考虑的是数据存储在数据库中的数据可视化系统,中间软件层将一个前端请求转换为数据库的 SQL 查询,以计算视觉结果。我们侧重于在预先设定的时间限制下处理视觉化请求的问题。我们研究如何通过添加提示和/或进行近似来重写原始查询,使整个时间在时间限制之内。我们开发了一个名为Maleva的新型中间软件解决方案,它采用机器学习(ML)技术解决问题。它应用Markov 决策程序模型来决定如何重写查询,并利用培训实例来学习一个可以明智地为在线请求做出一系列决定的代理。我们在真实和合成数据集上的实验表明,与依赖原始SQL 查询的基线方法相比,马里瓦在互动满足请求的机会和询问执行时间方面表现得要好得多。