![]() Output format: .ql.io. Value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string)Įxpressions: VALUE._col0 (type: int), VALUE._col1 (type: string), VALUE._col2 (type: string) Output format: .ql.io.HiveSequenceFileOutputFormat Statistics: Num rows: 5 Data size: 370 Basic stats: COMPLETE Column stats: NONE Value expressions: _col1 (type: string), _col2 (type: string)Įxpressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: string), VALUE._col1 (type: string) Statistics: Num rows: 8 Data size: 592 Basic stats: COMPLETE Column stats: NONEĮxpressions: id (type: int), phone (type: string), email (type: string) > 执行计划 explain select * from(select * from (SELECT id,phone,email FROM sen_t1 ORDER BY id desc )tmp limit 5)tmp2 观察这两个语句①` explain select * from(select * from (SELECT id,phone,email FROM sen_t1 ORDER BY id desc )tmp limit 5)tmp2 ` and ②`explain select * from(select * from (SELECT id,phone,email FROM sen_t1 ORDER BY id desc )tmp )tmp2 `这两个语句的执行计划,可以看到①因为里面多了`limit 5`字段而多了一次mapreduce过程,且在多的一次mapreduce过程中,Reduce Output Operator中sort order: 为空,这可能是导致①返回结果顺序变化的原因。 Select * from(select * from (SELECT id,phone,email FROM sen_t1 ORDER BY id desc )tmp )tmp2 Select * from(select * from (SELECT id,phone,email FROM sen_t1 ORDER BY id desc )tmp limit 5)tmp2 Select * from (SELECT id,phone,email FROM sen_t1 ORDER BY id desc )tmp limit 5 ![]() SELECT id,phone,email FROM sen_t1 ORDER BY id desc Left join tmp.tmp_jean_sitecarinfo c on b.leaguename = c.full_name Left join dim.baseorganize b on t.rec_site_name = b.fullname and b.deletionstatecode = 0 Download the binary file of Leanote.Project Design.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |