admin管理员组文章数量:1336367
I'm comparing to tables with the following:
WHERE tab1.id_1::date between 'YYYY-MM-DD' AND 'YYYY-MM-DD'
AND ((tab1.id_2 IS DISTINCT FROM tab2.id_2)
OR (tab1.id_3 IS DISTINCT FROM tab2.id_3)
OR (tab1.id_4 IS DISTINCT FROM tab2.id_4)
... -- a lot more conditions
)
The query is currently returning a large number of rows, many of which appear identical upon closer inspection. To optimize the result set, I only need to retrieve rows where at least one column differs between the two tables. Additionally, if two columns both contain null values, they should be considered equal and not included in the result set.
Thoughts?
本文标签: SnowflakeIS DISTINCT FROMStack Overflow
版权声明:本文标题:Snowflake - IS DISTINCT FROM - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742391107a2466009.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论