Alex Rivera | Logout

SQL Optimization: how many columns on a table?

Asked 2009-01-28T19:35:27.143
24

In a recent project I have seen a tables from 50 to 126 columns.

Should a table hold less columns per table or is it better to separate them out into a new table and use relationships? What are the pros and cons?

Edit
Report

2 Answers

0

The UserData table in SharePoint has 201 fields but is designed for a special purpose.
Normal tables should not be this wide in my opinion.

You could probably normalize some more. And read some posts on the web about table optimization.

It is hard to say without knowing a little bit more.

answered 2009-01-28T19:47:48.600
0

I'm in a similar position. Yes, there truly is a situation where a normalized table has, like in my case, about 90, columns: a work flow application that tracks many states that a case can have in addition to variable attributes to each state. So as each case (represented by the record) progresses, eventually all columns are filled in for that case. Now in my situation there are 3 logical groupings (15 cols + 10 cols + 65 cols). So do I keep it in one table (index is CaseID), or do I split into 3 tables connected by one-to-one relationship?

answered 2009-06-22T22:17:20.110

Your Answer