简体   繁体   中英

Is it possible to column partitioning in SQL Server

The size of each record of table is a performance parameter. that means if size of record was small SQL Server fetch more records in each read from physical hard.

In most of our queries we not use all column of table, and may be some column use only in specific query. Is it possible for we partitioning columns of each table to have better performance.

I use SQL Server 2008 R2.

Thank you.

True column level partitioning comes with column oriented storage, see Inside the SQL Server 2012 Columnstore Indexes , but that is available only in SQL Server 2012 and addresses specific BI workloads, not general SQL Server apps.

In row oriented storage the vertical partitioning is actually another name for designing proper covering indexes. If the engine has an alternative narrow index it will use it instead of the base table, when possible.

The last alternative, manually splinting the table and joining the vertical 'shards' in queries (or defining joining views, same thing) is usually ill advised and seldom pays off.

At the moment with SQL Server 2008, you cannot partition tables horizontally. If you have a large number of columns, you would need to chop it into horizontal chunk tables that share a common key and then skin them with an update-able view to give the illusion of one very wide table.

If there are just a few large columns (eg VARCHAR(1000) ), you can normalize your data into unique value tables.

The one exception to the no column partitioning rule are character columns declared as max (varchar(max), for example).

These are stored on a separate data page. I believe this page is not read in unless the column is referenced in the query. If I am wrong, I'am sure more knowledge people will correct me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM