You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Luca Bruno (JIRA)" <ji...@apache.org> on 2016/02/05 14:56:39 UTC
[jira] [Updated] (DRILL-4357) Planner max time limit
[ https://issues.apache.org/jira/browse/DRILL-4357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luca Bruno updated DRILL-4357:
------------------------------
Description:
The plan for this kind of query takes an indefinite amount of time:
{noformat}
SELECT label, AVG(foo) FROM (
SELECT label, AVG(x) as foo FROM table1 GROUP BY label
UNION ALL
SELECT label, AVG(y) as foo FROM table2 GROUP BY label
UNION ALL
... 30 times
) GROUP BY label
{noformat}
That is, the query is not executed at all, because the planning does not finish (we're talking about hours).
By disabling planner.enable_multiphase_agg, the planning completes immediately and the query runs.
But I guess this can happen also for other kind of queries. I'd like to suggest a way to limit the planning time. Once this time elapses, the planner outputs the best plan found so far.
was:
The plan for this kind of query takes an indefinite amount of time:
SELECT label, AVG(foo) FROM (
SELECT label, AVG(x) as foo FROM table1 GROUP BY label
UNION ALL
SELECT label, AVG(y) as foo FROM table2 GROUP BY label
UNION ALL
... 30 times
) GROUP BY label
That is, the query is not executed at all, because the planning does not finish (we're talking about hours).
By disabling planner.enable_multiphase_agg, the planning completes immediately and the query runs.
But I guess this can happen also for other kind of queries. I'd like to suggest a way to limit the planning time. Once this time elapses, the planner outputs the best plan found so far.
> Planner max time limit
> ----------------------
>
> Key: DRILL-4357
> URL: https://issues.apache.org/jira/browse/DRILL-4357
> Project: Apache Drill
> Issue Type: Improvement
> Components: Query Planning & Optimization
> Environment: Debian Linux, Drill embedded 1.4, one machine.
> Reporter: Luca Bruno
>
> The plan for this kind of query takes an indefinite amount of time:
> {noformat}
> SELECT label, AVG(foo) FROM (
> SELECT label, AVG(x) as foo FROM table1 GROUP BY label
> UNION ALL
> SELECT label, AVG(y) as foo FROM table2 GROUP BY label
> UNION ALL
> ... 30 times
> ) GROUP BY label
> {noformat}
> That is, the query is not executed at all, because the planning does not finish (we're talking about hours).
> By disabling planner.enable_multiphase_agg, the planning completes immediately and the query runs.
> But I guess this can happen also for other kind of queries. I'd like to suggest a way to limit the planning time. Once this time elapses, the planner outputs the best plan found so far.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)