Apache Drill

编程入门 行业动态 更新时间:2024-10-27 22:24:37
本文介绍了Apache Drill - 首次启动时间很长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用 Drill 在 MongoDB 后端运行 SQL.我的响应时间约为 500 毫秒.但大部分时间都花在首次启动"阶段.钻探中的实际处理时间要少得多(~50ms).为什么第一次开始"需要这么多时间?我想知道在该阶段进行了哪些练习,并在可能的情况下对其进行优化.

I am running SQL on MongoDB backend using Drill. I am getting response time ~500ms. But most of that time is spent on "First start" phase. Actual processing in drill is taking much less time(~50ms). Why does "First start" take so much time? I would like to know what drill in doing in that phase and if possible optimise that.

片段配置文件

运营商简介

推荐答案

在第一次查询后 Drill 创建了很多缓存对象以改进进一步的工作,参见 Generated Code Cache [1], [2], [3] 详情,StoragePluginRegistry 缓存 [4].此外,MongoSchemaFactory 会为您的 database 和 tableName [5] 创建缓存,缓存会在 1 分钟后过期.

After the first query Drill creates a lot of cache objects to improve the further work, see Generated Code Cache [1], [2], [3] for details, StoragePluginRegistry Cache [4]. Also MongoSchemaFactory creates cache for your database and tableName [5], which expires after 1 minute.

如果您尝试执行查询,很可能会在缓存过期时获得相似的时间.

Most likely you will get the similar time, if you try to execute your query, when the cache expires.

[1] github/paul-rogers/drill/wiki/CG-Code-Cache[2] github/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ByteCodeLoader.java#L36[3] github/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java#L145[4] github/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java#L90[5] github/apache/drill/blob/master/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/schema/MongoSchemaFactory.java#L66

更多推荐

Apache Drill

本文发布于:2023-11-24 04:03:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623904.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Apache   Drill

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!