• <legend id='JcDTj'><style id='JcDTj'><dir id='JcDTj'><q id='JcDTj'></q></dir></style></legend>
    <tfoot id='JcDTj'></tfoot>

  • <small id='JcDTj'></small><noframes id='JcDTj'>

      <bdo id='JcDTj'></bdo><ul id='JcDTj'></ul>

    1. <i id='JcDTj'><tr id='JcDTj'><dt id='JcDTj'><q id='JcDTj'><span id='JcDTj'><b id='JcDTj'><form id='JcDTj'><ins id='JcDTj'></ins><ul id='JcDTj'></ul><sub id='JcDTj'></sub></form><legend id='JcDTj'></legend><bdo id='JcDTj'><pre id='JcDTj'><center id='JcDTj'></center></pre></bdo></b><th id='JcDTj'></th></span></q></dt></tr></i><div id='JcDTj'><tfoot id='JcDTj'></tfoot><dl id='JcDTj'><fieldset id='JcDTj'></fieldset></dl></div>

        mysql - 多少列太多了?

        mysql - how many columns is too many?(mysql - 多少列太多了?)
          <bdo id='3y9sj'></bdo><ul id='3y9sj'></ul>
          1. <i id='3y9sj'><tr id='3y9sj'><dt id='3y9sj'><q id='3y9sj'><span id='3y9sj'><b id='3y9sj'><form id='3y9sj'><ins id='3y9sj'></ins><ul id='3y9sj'></ul><sub id='3y9sj'></sub></form><legend id='3y9sj'></legend><bdo id='3y9sj'><pre id='3y9sj'><center id='3y9sj'></center></pre></bdo></b><th id='3y9sj'></th></span></q></dt></tr></i><div id='3y9sj'><tfoot id='3y9sj'></tfoot><dl id='3y9sj'><fieldset id='3y9sj'></fieldset></dl></div>
              <tbody id='3y9sj'></tbody>
            <tfoot id='3y9sj'></tfoot>
            <legend id='3y9sj'><style id='3y9sj'><dir id='3y9sj'><q id='3y9sj'></q></dir></style></legend>

              • <small id='3y9sj'></small><noframes id='3y9sj'>

                  本文介绍了mysql - 多少列太多了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在设置一个可能有 70 列以上的表格.我现在正在考虑将其拆分,因为每次访问表时都不需要列中的某些数据.再说一次,如果我这样做,我就不得不使用连接.

                  I'm setting up a table that might have upwards of 70 columns. I'm now thinking about splitting it up as some of the data in the columns won't be needed every time the table is accessed. Then again, if I do this I'm left with having to use joins.

                  在什么时候(如果有)被认为是太多列?

                  At what point, if any, is it considered too many columns?

                  推荐答案

                  一旦超过数据库支持的最大限制.

                  您不需要每个查询都返回每一列的事实是完全正常的;这就是为什么 SELECT 语句让您明确命名所需的列.

                  The fact that you don't need every column to be returned by every query is perfectly normal; that's why SELECT statement lets you explicitly name the columns you need.

                  作为一般规则,你的表结构应该反映你的领域模型;如果您确实有 70 个(100 个,您有什么)属于同一实体的属性,则没有理由将它们分成多个表.

                  As a general rule, your table structure should reflect your domain model; if you really do have 70 (100, what have you) attributes that belong to the same entity there's no reason to separate them into multiple tables.

                  这篇关于mysql - 多少列太多了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bogus foreign key constraint fail(虚假外键约束失败)
                  how to get last insert id after insert query in codeigniter active record(如何在codeigniter活动记录中插入查询后获取最后一个插入ID)
                  Force InnoDB to recheck foreign keys on a table/tables?(强制 InnoDB 重新检查表/表上的外键?)
                  How to auto generate migrations with Sequelize CLI from Sequelize models?(如何使用 Sequelize CLI 从 Sequelize 模型自动生成迁移?)
                  Clear MySQL query cache without restarting server(无需重启服务器即可清除 MySQL 查询缓存)
                  ALTER TABLE to add a composite primary key(ALTER TABLE 添加复合主键)

                    <tbody id='8GwUv'></tbody>

                      <bdo id='8GwUv'></bdo><ul id='8GwUv'></ul>
                    • <small id='8GwUv'></small><noframes id='8GwUv'>

                        1. <legend id='8GwUv'><style id='8GwUv'><dir id='8GwUv'><q id='8GwUv'></q></dir></style></legend>
                          <tfoot id='8GwUv'></tfoot>
                            <i id='8GwUv'><tr id='8GwUv'><dt id='8GwUv'><q id='8GwUv'><span id='8GwUv'><b id='8GwUv'><form id='8GwUv'><ins id='8GwUv'></ins><ul id='8GwUv'></ul><sub id='8GwUv'></sub></form><legend id='8GwUv'></legend><bdo id='8GwUv'><pre id='8GwUv'><center id='8GwUv'></center></pre></bdo></b><th id='8GwUv'></th></span></q></dt></tr></i><div id='8GwUv'><tfoot id='8GwUv'></tfoot><dl id='8GwUv'><fieldset id='8GwUv'></fieldset></dl></div>