I am working on SQL Server and want to create a partition on a table. I want to base it off of a foreign key which is in another table.
我正在使用SQL Server,希望在表上创建一个分区。我想把它从另一个表的外键中提取出来。
table1 (
fk uniqueidentifier,
data
)
fk points to table2
颗指向表
table 2 (
partition element here
)
I want to partition table1 base on table2's data, ie if table2 contains categories
我想根据表2的数据对表1进行分区,即如果表2包含类别
1 个解决方案
#1
4
The foreign key relationship doesn't really matter, horizontal partitioning is based on the values in the table itself. The foreign key just makes sure they already exist in another table.
外键关系并不重要,水平分区是基于表本身的值的。外键确保它们已经存在于另一个表中。
Links:
链接:
- SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table
- SQL SERVER - 2005 -数据库表分区教程-如何水平分区数据库表
- Partitioning a SQL Server Database Table
- 对SQL Server数据库表进行分区
- Steps for Creating Partitioned Tables
- 创建分区表的步骤
#1
4
The foreign key relationship doesn't really matter, horizontal partitioning is based on the values in the table itself. The foreign key just makes sure they already exist in another table.
外键关系并不重要,水平分区是基于表本身的值的。外键确保它们已经存在于另一个表中。
Links:
链接:
- SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table
- SQL SERVER - 2005 -数据库表分区教程-如何水平分区数据库表
- Partitioning a SQL Server Database Table
- 对SQL Server数据库表进行分区
- Steps for Creating Partitioned Tables
- 创建分区表的步骤