SQL Optimization: how many columns on a table?

后端 未结 13 1041
离开以前
离开以前 2021-01-01 13:43

The current project that I\'m working on have table with 126 columns and the least that i saw is at least 50 columns. Should a table hold less columns per table or separate

13条回答
  •  春和景丽
    2021-01-01 14:03

    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?

提交回复
热议问题