arXiv:2504.06399cs.DBcs.LG2025-04被引 5

用低秩学习优化离线查询计划,大幅降低资源消耗。

Low Rank Learning for Offline Query Optimization

  • 将工作负载建模为低秩矩阵,用线性方法预测延迟
  • 1.5小时探索即把3小时工作量压缩至1.5小时
  • 无需依赖数据库系统,适合生产环境部署

近期的机器学习查询优化器普遍使用昂贵的神经网络和随意的搜索策略。为此,我们提出 extsc{LimeQO} 框架,通过低秩学习实现高效的离线查询计划探索,显著降低资源开销。将工作负载视为部分观测的低秩矩阵,利用纯线性方法预测未观测查询计划的延迟,相比神经网络大幅减少计算开销。我们将离线探索形式化为主动学习问题,提出简单启发式方法,在仅1.5小时探索后,将3小时的工作负载缩减至1.5小时。此外,我们还设计了一种传递型树卷积神经网络(TCNN),尽管计算成本较高,但仅需0.5小时探索即可达成相同效果。与以往将高成本神经网络置于查询处理‘热路径’的做法不同,本方法提供低开销方案,并保证无退化,且不依赖底层数据库管理系统。代码已开源。

原文摘要 · Abstract (English)

Recent deployments of learned query optimizers use expensive neural networks and ad-hoc search policies. To address these issues, we introduce \textsc{LimeQO}, a framework for offline query optimization leveraging low-rank learning to efficiently explore alternative query plans with minimal resource usage. By modeling the workload as a partially observed, low-rank matrix, we predict unobserved query plan latencies using purely linear methods, significantly reducing computational overhead compared to neural networks. We formalize offline exploration as an active learning problem, and present simple heuristics that reduces a 3-hour workload to 1.5 hours after just 1.5 hours of exploration. Additionally, we propose a transductive Tree Convolutional Neural Network (TCNN) that, despite higher computational costs, achieves the same workload reduction with only 0.5 hours of exploration. Unlike previous approaches that place expensive neural networks directly in the query processing ``hot'' path, our approach offers a low-overhead solution and a no-regressions guarantee, all without making assumptions about the underlying DBMS. The code is available in \href{https://github.com/zixy17/LimeQO}{https://github.com/zixy17/LimeQO}.

查询优化低秩学习数据库

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。