如何在ms sql server中处理具有超过16个键的事实表

发布于 2024-07-29 03:16:40 字数 94 浏览 4 评论 0原文

我有一个有 17 个键的事实表。 通常我一直将主键指定为我的所有维度键。 MS SQL Server 2008 在主键或唯一约束中限制为 16 列。 有什么解决方法吗?

I have a fact table that has 17 keys. Normally I have been designating the primary key as all of my dimensional keys. MS SQL server 2008 has a limitation of 16 columns in a primary key or unique constraint. Are there any work arounds?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

指尖凝香 2024-08-05 03:16:40

为事实表创建代理主键。

Create a surrogate primary key for the fact table.

无人接听 2024-08-05 03:16:40

构建一个计算列作为串联和索引?

您只需连接超过第 15 列的列,并将多余的列设为第 16 列。

您确定需要十七个维度吗?

Build a calculated column as a concatenation and index on that?

You only need to concatenate the columns in excess of the 15th, and make that extra column the 16th.

Are you sure you need seventeen dimensions?

电影里的梦 2024-08-05 03:16:40

我下载了微软的real项目。 它们不包括 pk 中的所有密钥。 有两种情况。 如果根据业务规则,所有键实际上都是唯一的,那么这就是 pk。 2-如果表上的键数量多于根据业务规则使其唯一的键数量,则在唯一键上使用聚集索引,并且该表没有主键。

I downloaded Microsoft's project real. They do not include all keys in the pk. There are 2 scenarios. If all the keys actually are unique per the business rules then that is the pk. 2- If there are more keys on the table than what makes it unique per the busines rules, then a clustered index is used on the unique keys and the table doesn't have a primary key.

陈甜 2024-08-05 03:16:40

我希望你没有太多事实。 对于 17 个维度,您会遇到快速聚合的问题。

I hope you do not have a lot of facts. With 17 dimensions you run into problems aggregating realy fast.

唠甜嗑 2024-08-05 03:16:40

可以合并尺寸吗? 我曾经拥有三个维度,每个维度有三到四个值,并将它们集中到一个大约有 48 行的“垃圾”维度(Kimball 的名字,不是我的)。

Can you combine dimensions? I once had three dimensions with three-four values each, and lumped them together into a "junk" dimension (Kimball's name, not mine) with about 48 rows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文