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

    1. <legend id='f3w6l'><style id='f3w6l'><dir id='f3w6l'><q id='f3w6l'></q></dir></style></legend><tfoot id='f3w6l'></tfoot>

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

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

    2. mysql 索引太多?

      mysql too many indexes?(mysql 索引太多?)

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

        <tbody id='khXrb'></tbody>
      <tfoot id='khXrb'></tfoot>

        <legend id='khXrb'><style id='khXrb'><dir id='khXrb'><q id='khXrb'></q></dir></style></legend>

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

                问题描述

                我正在花一些时间优化我们当前的数据库.

                I am spending some time optimizing our current database.

                我正在专门研究索引.

                有几个问题:

                • 索引是否过多?
                • 索引会加速什么?
                • 索引会减慢什么?
                • 什么时候添加索引比较好?
                • 什么时候添加索引是个坏主意?
                • 多索引与多列索引的优缺点?

                推荐答案

                索引会加速什么?

                What will indexes speed up?

                数据检索 -- SELECT 语句.

                Data retrieval -- SELECT statements.

                索引会减慢什么?

                数据操作 -- INSERT、UPDATE、DELETE 语句.

                Data manipulation -- INSERT, UPDATE, DELETE statements.

                什么时候添加索引比较好?

                When is it a good idea to add an index?

                如果您想获得更好的数据检索性能.

                If you feel you want to get better data retrieval performance.

                什么时候添加索引是个坏主意?

                When is it a bad idea to add an index?

                在将要进行大量数据操作的表上 -- 插入、更新...

                On tables that will see heavy data manipulation -- insertion, updating...

                多索引与多列索引的优缺点?

                Pro's and Con's of multiple indexes vs multi-column indexes?

                在处理覆盖索引(多列上的索引)时,查询需要处理列的顺序,在索引列定义中从左到右.语句中的列顺序无关紧要,只有第 1、2 和 3 列的顺序 - 在使用索引之前,语句需要引用第 1 列.如果只有第 2 列或第 3 列的引用,则无法使用 1/2/3 的覆盖索引.

                Queries need to address the order of columns when dealing with a covering index (an index on more than one column), from left to right in index column definition. The column order in the statement doesn't matter, only that of columns 1, 2 and 3 - a statement needs have a reference to column 1 before the index can be used. If there's only a reference to column 2 or 3, the covering index for 1/2/3 could not be used.

                在 MySQL 中,查询中的每个 SELECT/语句只能使用一个索引(子查询/等被视为单独的语句).MySQL 允许的每个表的空间量是有限制的.此外,在索引列上运行函数会使索引无用 - IE:

                In MySQL, only one index can be used per SELECT/statement in the query (subqueries/etc are seen as a separate statement). And there's a limit to the amount of space per table that MySQL allows. Additionally, running a function on an indexed column renders the index useless - IE:

                WHERE DATE(datetime_column) = ...
                

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

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

                相关文档推荐

                ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                SQL query to group by day(按天分组的 SQL 查询)
                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 按组最频繁)
                Include missing months in Group By query(在 Group By 查询中包含缺失的月份)
                <i id='qUS3t'><tr id='qUS3t'><dt id='qUS3t'><q id='qUS3t'><span id='qUS3t'><b id='qUS3t'><form id='qUS3t'><ins id='qUS3t'></ins><ul id='qUS3t'></ul><sub id='qUS3t'></sub></form><legend id='qUS3t'></legend><bdo id='qUS3t'><pre id='qUS3t'><center id='qUS3t'></center></pre></bdo></b><th id='qUS3t'></th></span></q></dt></tr></i><div id='qUS3t'><tfoot id='qUS3t'></tfoot><dl id='qUS3t'><fieldset id='qUS3t'></fieldset></dl></div>

                    <bdo id='qUS3t'></bdo><ul id='qUS3t'></ul>
                      <tbody id='qUS3t'></tbody>

                        <legend id='qUS3t'><style id='qUS3t'><dir id='qUS3t'><q id='qUS3t'></q></dir></style></legend>
                      1. <tfoot id='qUS3t'></tfoot>

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