SQL Server 2017中的表分区 [英] Table partitioning in SQL server 2017
问题描述
大家好,
请您更正/建议表分区的详细信息。
Could you please correct/suggest the details on table partitioning.
我有一张大桌子,我想要根据varchar列进行分区,varchar列是一个国家(IND,AUS,US)。由于分区在RANGES上工作,我的数据位于错误的file_groups或错误的分区中。由于我的
表中没有countryID列,因此无法根据INT值进行操作。我必须使用国家代码。是否有任何建议使数据位于varchar列的正确分区中?
I have a big table which i want to partition it based on the varchar column which is a country (IND, AUS, US). As the partitions works on the RANGES, my data is sitting in the wrong file_groups or wrong partitions. As I don't have a countryID column in my table i can't go based on the INT values. I have to go with the country codes. Is there any suggestion to make the data sit in correct partitions for varchar columns?
其次,是否必须在分区列上使用聚簇索引?由于我的分区键是Varchar列,我不会 想要在其上创建一个Clustered索引。请建议。
Secondly, Is it mandatory to have a Clustered index on the partitioned column? As my partition key is a Varchar column, i dont want to create a Clustered index on it. Please suggest .
谢谢,
Kiran
推荐答案
只是评论:
我会检查数据和流程,因为您似乎正在将ISO 3字母与ISO 2字母代码混合使用。这必须首先解决。这样做也可以让您切换到ISO编号。
I would check the data and processes, cause it seems that you're mixing ISO 3-letter with ISO 2-letter codes. This must be imho addressed first. Doing this may also allow you to switch to ISO number codes.
这篇关于SQL Server 2017中的表分区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!