_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › HiveTuning

Contents

1 SQL Server ODBC郁屋 Hive 一危 螳語
2 一 貉 曙
3 郁鍵


1 SQL Server ODBC郁屋 Hive 一危 螳語 #

sql1覦覲企 sql2 覦朱 螳語る蟆 4~10覦 觜襯企. (蟆渚朱..)

sql1
drop table if exists #temp1
select *
into #temp1
from openquery(hive, '
select
    col1, col2, col3
from gamelog
where 1=1
and a.date_key between 20190619 and 20190821
'
)

sql2
exec('drop table if exists etl_fcc1d2fd1da44550bbde0661f25b631a;') at hive
 
exec('
create table etl_fcc1d2fd1da44550bbde0661f25b631a
as
select
    col1, col2, col3
from gamelog
where 1=1
and a.date_key between 20190619 and 20190821
') at hive
go
 
drop table if exists #1
select *
into #1
from openquery(hive, '
select
    col1, col2, col3
from etl_fcc1d2fd1da44550bbde0661f25b631a')
--4:30


2 一 貉 曙 #

:

gamelog 企 date_key, log_no襦 一 企企.
螳 一 る 暑 貎朱Μ襯 碁.
蠏碁磯 1螳 蟇碁Μ 蟆企.
hive> set hive.execution.engine=mr;
hive> select log_no
    > from gamelog
    > where 1=1
    > and date_key=20181228
    > group by log_no;

願屋:
覓語 覈襯願朱 覃讌襯 危エ覲企 蟆.
伎 hive螳 input data size襯 譟碁 豢 蟆 .
hive.png

蠏碁 碁 一 り るジ 一危磯 譟壱襦 伎.
hive> select log_no, count(get_json_object(log_string, '$.1') cnt
    > from gamelog
    > where 1=1
    > and date_key=20181228
    > group by log_no;

3 郁鍵 #

蠍一 ろ
set hive.mapred.reduce.tasks.speculative.execution =true;

map 襴蠍(襯 蟆 襦 map螳 企)
set mapreduce.input.fileinputformat.split.maxsize=1048576; 
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2021-03-05 10:58:17

る 蟆 襷譯朱慨 蟆 蟷 螳 覦レ 覦朱慨 蟆企. (曙覯襴)