1. <legend id='lyb1i'><style id='lyb1i'><dir id='lyb1i'><q id='lyb1i'></q></dir></style></legend>
      <bdo id='lyb1i'></bdo><ul id='lyb1i'></ul>
    1. <small id='lyb1i'></small><noframes id='lyb1i'>

      <tfoot id='lyb1i'></tfoot>
      <i id='lyb1i'><tr id='lyb1i'><dt id='lyb1i'><q id='lyb1i'><span id='lyb1i'><b id='lyb1i'><form id='lyb1i'><ins id='lyb1i'></ins><ul id='lyb1i'></ul><sub id='lyb1i'></sub></form><legend id='lyb1i'></legend><bdo id='lyb1i'><pre id='lyb1i'><center id='lyb1i'></center></pre></bdo></b><th id='lyb1i'></th></span></q></dt></tr></i><div id='lyb1i'><tfoot id='lyb1i'></tfoot><dl id='lyb1i'><fieldset id='lyb1i'></fieldset></dl></div>
    2. SQL Server 2005 中没有聚集索引的原因

      Reasons not to have a clustered index in SQL Server 2005(SQL Server 2005 中没有聚集索引的原因)

          <small id='Dem0u'></small><noframes id='Dem0u'>

            <tbody id='Dem0u'></tbody>

        • <tfoot id='Dem0u'></tfoot>

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

              • 本文介绍了SQL Server 2005 中没有聚集索引的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我为 SQL SERVER 2005 数据库继承了一些数据库创建脚本.

                I've inherited some database creation scripts for a SQL SERVER 2005 database.

                我注意到的一件事是,所有主键都创建为 NON CLUSTERED 索引,而不是集群.

                One thing I've noticed is that all primary keys are created as NON CLUSTERED indexes as opposed to clustered.

                我知道每个表只能有一个聚集索引,并且您可能希望将它放在非主键列上以提高搜索查询性能等.但是没有其他 CLUSTERED 索引在有问题的桌子上.

                I know that you can only have one clustered index per table and that you may want to have it on a non primary key column for query performance of searches etc. However there are no other CLUSTERED indexes on the tables in questions.

                所以我的问题是,除了上述之外,是否有任何技术原因不在主键列上使用聚集索引.

                推荐答案

                在任何正常"数据或查找表上:不,我看不出任何原因.

                On any "normal" data or lookup table: no, I don't see any reason whatsoever.

                关于大容量导入表或临时表之类的东西 - 视情况而定.

                On stuff like bulk import tables, or temporary tables - it depends.

                对于某些人来说,令人惊讶的是,拥有一个好的聚集索引实际上可以加快 INSERT 或 UPDATE 等操作的速度.参见 Kimberly Tripps 优秀的聚集索引辩论继续...... 博文中她详细解释了为什么会这样.

                To some people surprisingly, it appears that having a good clustered index actually can speed up operations like INSERT or UPDATE. See Kimberly Tripps excellent The Clustered Index Debate continues.... blog post in which she explains in great detail why this is the case.

                从这个角度来看:我没有看到任何正当理由拥有一个好的聚集索引(窄、稳定、独特、不断增加 = INT IDENTITY 作为最明显的选择)在任何 SQL Server 表上.

                In this light: I don't see any valid reason not to have a good clustered index (narrow, stable, unique, ever-increasing = INT IDENTITY as the most obvious choice) on any SQL Server table.

                要深入了解如何以及为什么选择集群键,请阅读 Kimberly Tripp 就该主题撰写的所有优秀博客文章:

                To get some deep insights into how and why to choose clustering keys, read all of Kimberly Tripp's excellent blog posts on the topic:

                http://www.sqlskills.com/BLOGS/KIMBERLY/category/Clustering-Key.aspx

                http://www.sqlskills.com/BLOGS/KIMBERLY/category/Clustered-Index.aspx

                来自索引女王"的好东西!:-)

                Excellent stuff from the "Queen of Indexing" ! :-)

                这篇关于SQL Server 2005 中没有聚集索引的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)(超出最大存储过程、函数、触发器或视图嵌套级别(限制 32))
                How to debug stored procedure in VS 2015?(如何在 VS 2015 中调试存储过程?)
                How to find a text inside SQL Server procedures / triggers?(如何在 SQL Server 程序/触发器中查找文本?)
                SQL Server stored procedure return code oddity(SQL Server 存储过程返回码奇怪)
                Conditional SQL ORDER BY ASC/DESC for alpha columns(alpha 列的条件 SQL ORDER BY ASC/DESC)
                Export stored procedure result set to Excel in SSMS(在SSMS中将存储过程结果集导出到Excel)

                <tfoot id='7bHHs'></tfoot>

                  <tbody id='7bHHs'></tbody>

                      <small id='7bHHs'></small><noframes id='7bHHs'>

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