MarvinLitt commented on a change in pull request #3518: [DOC] add performance-tuning with codegen parameters support URL: https://github.com/apache/carbondata/pull/3518#discussion_r364208450
########## File path: docs/query-with-spark-sql-performacne-tuning.md ########## @@ -0,0 +1,58 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to you under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +# Query with spark-sql performacne tuning + This tutorial guides you to create CarbonData Tables and optimize performance. + The following sections will elaborate on the below topics : + + * [The influence of spark.sql.codegen.wholeStage configuration on query](#The influence of spark.sql.codegen.wholeStage configuration on query) + +## The influence of spark.sql.codegen.wholeStage configuration on query + +In practice, we found that when the sum of CarbonData's queries reaches a certain threshold, the query time increases dramatically. As shown in the figure below(spark 2.1): + +![File Directory Structure](../docs/images/codegen.png?raw=true) + +The horizontal axis is the number of sum, and the vertical axis is the time consumed in seconds. + +It can be seen from the figure that when the number of sum exceeds 85, the query time is significantly increased. + +After analysis, this problem is related to spark.sql.codegen.wholeStage, which is enabled by default for spark 2.0. and it will do all the *internal optimization possible from the spark catalist side*. [https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html](https://jaceklaskowski.gitbooks.io/mastering-spark-sql/spark-sql-whole-stage-codegen.html) Review comment: okay, done ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services