You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/03/03 01:27:45 UTC

[jira] [Updated] (CALCITE-1656) Improve cost function in DruidQuery to encourage early column pruning

     [ https://issues.apache.org/jira/browse/CALCITE-1656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde updated CALCITE-1656:
---------------------------------
    Summary: Improve cost function in DruidQuery to encourage early column pruning  (was: Sub-Optimal Druid Query planning - Does not Prune columns for DruidQuery )

> Improve cost function in DruidQuery to encourage early column pruning
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-1656
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1656
>             Project: Calcite
>          Issue Type: Bug
>          Components: druid
>            Reporter: Nishant Bangarwa
>            Assignee: Nishant Bangarwa
>              Labels: performance
>             Fix For: 1.12.0
>
>
> Consider below query - 
> {code}
> select "countryName", floor("time" to DAY), cast(count(*) as integer) as c
>          from "wiki"
>          where floor("time" to DAY) >= '1997-01-01 00:00:00' and          floor("time" to DAY) < '1997-09-01 00:00:00'
>          group by "countryName", floor("time" TO DAY)
>          order by c limit 5
> {code} 
> resulting Druid Query - 
> {code}
> {
>   "queryType": "select",
>   "dataSource": "wikiticker",
>   "descending": false,
>   "intervals": [
>     "1900-01-09T00:00:00.000/2992-01-10T00:00:00.000"
>   ],
>   "dimensions": [
>     "channel",
>     "cityName",
>     "comment",
>     "countryIsoCode",
>     "countryName",
>     "isAnonymous",
>     "isMinor",
>     "isNew",
>     "isRobot",
>     "isUnpatrolled",
>     "metroCode",
>     "namespace",
>     "page",
>     "regionIsoCode",
>     "regionName",
>     "user"
>   ],
>   "metrics": [
>     "count",
>     "added",
>     "deleted",
>     "delta",
>     "user_unique"
>   ],
>   "granularity": "all",
>   "pagingSpec": {
>     "threshold": 16384,
>     "fromNext": true
>   },
>   "context": {
>     "druid.query.fetch": false
>   }
> }
> {code} 
> Note that the above druid query has extra dimensions which are not required. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)