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

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

    2. <tfoot id='mfqdR'></tfoot>

      MySQL:唯一字段需要是索引吗?

      MySQL: unique field needs to be an index?(MySQL:唯一字段需要是索引吗?)

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

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

              • <bdo id='bJ2Gc'></bdo><ul id='bJ2Gc'></ul>
                <i id='bJ2Gc'><tr id='bJ2Gc'><dt id='bJ2Gc'><q id='bJ2Gc'><span id='bJ2Gc'><b id='bJ2Gc'><form id='bJ2Gc'><ins id='bJ2Gc'></ins><ul id='bJ2Gc'></ul><sub id='bJ2Gc'></sub></form><legend id='bJ2Gc'></legend><bdo id='bJ2Gc'><pre id='bJ2Gc'><center id='bJ2Gc'></center></pre></bdo></b><th id='bJ2Gc'></th></span></q></dt></tr></i><div id='bJ2Gc'><tfoot id='bJ2Gc'></tfoot><dl id='bJ2Gc'><fieldset id='bJ2Gc'></fieldset></dl></div>
                本文介绍了MySQL:唯一字段需要是索引吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的表中有一个 UNIQUE 字段,我需要快速搜索它.我需要索引它吗?

                I have one UNIQUE field in my table, and I need to search over it quickly. Do I need to index it?

                对唯一字段和索引字段的搜索速度或资源使用情况是否有所不同?

                Do searches over unique fields and indexed fields vary in speed or resource usage?

                推荐答案

                不需要,您不必再次索引它.当您指定 UNIQUE KEY 时,该列将被编入索引.因此它与相同类型的其他索引列(例如PRIMARY KEY)在性能上没有区别.

                No, you dont have to index it again. When you specify UNIQUE KEY, the column is indexed. So it has no difference in performance with other indexed column (e.g. PRIMARY KEY) of same type.

                但是如果类型不同,性能差异很小.

                However if the type is different, there will be little performance difference.

                这篇关于MySQL:唯一字段需要是索引吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)
                  • <small id='BJ2zB'></small><noframes id='BJ2zB'>

                      <tbody id='BJ2zB'></tbody>

                      <tfoot id='BJ2zB'></tfoot>
                        <bdo id='BJ2zB'></bdo><ul id='BJ2zB'></ul>
                        <legend id='BJ2zB'><style id='BJ2zB'><dir id='BJ2zB'><q id='BJ2zB'></q></dir></style></legend>

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