Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1913

Re: Best Practices for Wide Columns in Tables

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Best Practices for Wide Columns in Tables
Date 2015-04-30 12:29 +0000
Organization Erland Sommarskog
Message-ID <XnsA48C939DC2F5DYazorman@127.0.0.1> (permalink)
References <mhstjv$v1d$1@dont-email.me>

Show all headers | View raw


Michael Cole (noone@invalid.com) writes:
> This is one where there seems to be a lot of conflicting advice out 
> there in google-land.
> 
> If we have tables with one or more wide columns - VarChar with size of 
> over 8K in total - should these columns be moved to their own 
> wide-column table with the initial table simply linking to them?  Is 
> there much of an advantage/disadvantage to this, or does it actually 
> depend on how much is stored in them, not the empty column widths?

Yes, that's the answer: it depends.

For instance, If I add an xml column to store some freer-form data, I may 
not want to store it out of table just because it could fit more than 8K of 
data.

And if I have table where the main meat is the BLOB data, it is not likely 
that I would like to store it in a separate table.

But it the blob is not often accessed and the table have lots of columns and 
I expect scans to be common place, storing it in a separte table makes 
sense. 



-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Best Practices for Wide Columns in Tables Michael Cole <noone@invalid.com> - 2015-04-30 19:46 +1000
  Re: Best Practices for Wide Columns in Tables Erland Sommarskog <esquel@sommarskog.se> - 2015-04-30 12:29 +0000
    Re: Best Practices for Wide Columns in Tables rja.carnegie@gmail.com - 2015-05-06 19:46 -0700
      Re: Best Practices for Wide Columns in Tables Erland Sommarskog <esquel@sommarskog.se> - 2015-05-07 21:29 +0200

csiph-web