我正在使用 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
发布评论