hive查询需要无限长时间执行

时间:2017-06-06 13:21:19

标签: sql hive

以下配置单元查询执行时间超过3天(超过3天)。不确定查询中的任何优化是否有帮助。

任何建议表示赞赏!!

    select count(distinct(a.custname)) from (
    (select custname, pages, variable
    from table1
    where date_time between "2017-01-01" and "2017-01-31" 
    and (pages in ('Summary', 'Details') 
    or variable in ('Complete', 'Receive'))) a
    left join
    (select custname, pages, variable
    from table1
    where date_time between "2017-01-01 00:00:00" and "2017-01-31 00:00:00" 
    and (pages not in ('Summary', 'Details') 
    and variable not in ('Complete', 'Receive'))) b
    on a.custname = b.custname)
    where b.pages is null

1 个答案:

答案 0 :(得分:0)

Route::get('create/bussiness', [
    'as' => 'my_route_name',
    'uses' => 'BusinessController@createBusiness'
]);