SQL Optimization: how many columns on a table?

后端 未结 13 972
离开以前
离开以前 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:20

    I can picture times when it might be necessary to have this many, or more columns. Examples would be if you had to denormalize and cache data - or for a type of row with many attributes. I think the keys are to avoid select * and make sure you are indexing the right columns and composites.

提交回复
热议问题