Hive 研发笔记---LEFT JOIN 中的坑

</pre>              因为日志急速增长,原来放在Mysql上的统计 越来越吃力,所以公司决定把统计业务迁移到Hadoop上。<p></p><p>在比对数据的时候,发现了Hive中的一个坑</p><p></p><pre name="code" class="sql">select a.* from  default.t_softuser a
left join
 t_softuser b on
a.hid=b.hid and a.corp=b.corp and a.softid=b.softid and a.statdate='2015-01-27' and b.statdate='2015-01-27'
where b.hid is null

Explain

STAGE DEPENDENCIES:
  Stage-4 is a root stage , consists of Stage-1
  Stage-1
  Stage-0 is a root stage

STAGE PLANS:
  Stage: Stage-4
    Conditional Operator

  Stage: Stage-1
    Map Reduce
      Map Operator Tree:
          TableScan
            alias: a
            Statistics: <span style="color:#FF6666;">Num rows: 878083830 Data size: 60095442437 Basic stats: PARTIAL Column stats: NONE</span>
            Reduce Output Operator
              key expressions: hid (type: string), corp (type: string), softid (type: int)
              sort order: +++
              Map-reduce partition columns: hid (type: string), corp (type: string), softid (type: int)
              Statistics: Num rows: 878083830 Data size: 60095442437 Basic stats: COMPLETE Column stats: NONE
              value expressions: hid (type: string), corp (type: string), softid (type: int), install_time (type: string), lastvisit_time (type: string), active_day (type: int), state (type: int), statdate (type: string)
          TableSc
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值