首页> 外文会议>International conference on very large data bases >BlackMagic: Automatic Inlining of Scalar UDFs into SQL Queries with Froid
【24h】

BlackMagic: Automatic Inlining of Scalar UDFs into SQL Queries with Froid

机译:BlackMagic:使用Froid将标量UDF自动内联到SQL查询中

获取原文

摘要

Relational DBMSs allow users to extend the standard declarative SQL language surface using User Defined Functions (UDFs) that implement custom behavior. While UDFs offer many advantages, it is well-known amongst practitioners that they can cause severe degradation in query performance. This degradation is due to the fact that state-of-the-art query optimizers treat UDFs as black boxes and do not reason about them during optimization. We demonstrate Froid, a framework for optimizing UDFs by opening up this black box and exposing its underlying operations to the query optimizer. It achieves this by systematically translating the entire body of an imperative multi-statement UDF into a. single relational algebraic expression. Thereby, any query invoking this UDF is transformed into a query with a nested sub-query that is semantically equivalent to the UDF. We then leverage existing sub-query optimization techniques and thereby get efficient, set-oriented, parallel query plans as opposed to inefficient, iterative, serial execution of UDFs. We demonstrate the benefits of Froid including performance gains of up to multiple orders of magnitude on real workloads. Froid is available as a feature of Microsoft SQL Server 2019 called 'Scalar UDF Inlining'.
机译:关系DBMS允许用户使用实现自定义行为的用户定义函数(UDF)扩展标准的声明性SQL语言表面。尽管UDF具有许多优点,但从业人员中众所周知,UDF可能导致查询性能严重下降。这种降级是由于以下事实造成的:最先进的查询优化器将UDF视为黑匣子,并且在优化过程中不对它们进行推理。我们演示了Froid,它是通过打开黑匣子并将其底层操作公开给查询优化器来优化UDF的框架。它通过系统地将命令式多语句UDF的整个主体转换为a来实现此目的。单一关系代数表达式。因此,任何调用此UDF的查询都将转换为带有嵌套子查询的查询,该子查询在语义上等效于UDF。然后,我们利用现有的子查询优化技术,从而获得有效的,面向集合的并行查询计划,这与UDF的低效,迭代,串行执行相反。我们展示了Froid的优势,包括在实际工作负载上的性能提升高达多个数量级。 Froid是Microsoft SQL Server 2019的一项功能,称为``标量UDF内联''。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号