Search code examples
sql-serversql-server-2008-r2sql-server-2012partitioningdatabase-partitioning

how can I combine horizontal and vertical partitioning in SQL server


I want to combine horizontal and vertical partitioning because I have a huge table (huge number of records and also a big row size) .. I need to know does this combined partitioning cause any negative performance ..

  • Is combining between the two available in SQL server 208 R2?

  • Is there any live example for this combining or any video tutorial ?

  • Can I perform the vertical partitioning on the primary key ?

  • Is there any disadvantages for partitioning?


Solution

  • In theory I think they are possible to combine.

    Maybe there are some columns that are redundant or rarely accessed, this columns can be moved to another table linked to the primary table by primary key and foreign key relationships. And at the same time the primary table can be partitioned horizontally based on date column (or whatever your table data might be partitioned on).

    Vertical partitioning can't be done on the primary key because vertical partitioning divides a table into multiple tables that contain fewer columns.

    SQL Server 2014 supports up to 15,000 partitions by default. In versions earlier than SQL Server 2012, the number of partitions was limited to 1,000 by default. Your server needs to have at least 16Gb of RAM if a large number of partitions is in use. More than 1000 partitions affect performance, DML and DDL statements may cause memory issues.

    http://technet.microsoft.com/en-us/library/ms178148(v=sql.105).aspx