将TableA联接到Table B联接到Table C时的哈希分布 [英] Hashing Distributions when joining TableA to Table B to Table C

查看:92
本文介绍了将TableA联接到Table B联接到Table C时的哈希分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个漂亮的应用程序数据库,可以整理成一个集市.有一些大的表经常结合在一起,尽管我使用查询计划ADW优化了查询,但我觉得仍有一些改进的空间.

I have a lovely application database to tidy up into a mart. There's a few large tables which are often joined together and while I've optimised the queries using the query plans ADW I feel there may be some room for improvement. 

在将一个表连接到另一个表时,然后在另一个哈希列的第3个表上,是否有最佳的散列数据分配方法?每个表都有超过3000万行,并且大小相似.

Is there a best practice for hash distributing the data when joining one table to another, but then on a 3rd table over a different hash column? Each table has over 30m rows and are similar in size.

所以TableA ---(KeyA)->表B ---(密钥C)-> TableC.

So TableA  ---(KeyA)--> TableB ---(KeyC)--> TableC.

是要重新整理表的工作,还是数据移动服务仍然要执行的工作?

Would rehashing the table work or is that what the data movement service does anyway?

谢谢

G

推荐答案

以下是选择表类型的一些常规最佳做法

Here is some general best practices for choosing table types

https://blogs.msdn.microsoft.com/sqlcat/2015/08/11/choosing-hash-distributed-table-vs-round-robin-distributed-table-in-azure-sql-dw-service /

https://blogs.msdn.microsoft.com/sqlcat/2015/08/11/choosing-hash-distributed-table-vs-round-robin-distributed-table-in-azure-sql-dw-service/

我设计了一些表,在这些表中添加了其他表(TableA或TableB)中的列,以对TableC进行非规范化.那可能对您有用.

I have designed tables where I have added columns from other tables (TableA or TableB) to denormalize TableC. That may work out for you.

是的,DMS会在需要时进行改编(重新哈希处理)以重新对齐. 

Yes, DMS will do shuffle (rehash) to realign when needed. 


这篇关于将TableA联接到Table B联接到Table C时的哈希分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆