Hive SQL:如何与其他表加入时如何创建标志出现
I want to check whether my member from table A present in table B or not? Here is the problem is Both Table A and Table B has millions of records and table B have duplicate records. So that i cann't do left join. it takes hours to run.
Table A
Table B
Output
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用以下方式:
use this :
不是一个很好的解决方案,但是您可以尝试一下。
因此,我们不使用或不存在任何来获取一组数据,然后使用或存在以获取另一个集合。然后将它们全部结合在一起,以完整设置。
诀窍可能是,您可以为此运行2个单独的SQL,并且可以获得FURF FARCE BEANTION而不是所有联合。
不存在的方式将同样的方式,但可以为您带来更好的性能。
Not a very good solution but you can try this.
So, we use not in or not exists to get one set of data and then use in or exists to get another set. And then union them all together to get complete set.
The trick may be, you can run 2 separate SQL for this and will get perf benefit instead of union all.
Not exist will work same way but can give you better performance.