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

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

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

        <tfoot id='Zn2VQ'></tfoot>
        <legend id='Zn2VQ'><style id='Zn2VQ'><dir id='Zn2VQ'><q id='Zn2VQ'></q></dir></style></legend>

        如何确定mysql索引是否完全适合内存

        时间:2023-10-25
          <tfoot id='7r7Sa'></tfoot>

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

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

                <bdo id='7r7Sa'></bdo><ul id='7r7Sa'></ul>
                  <tbody id='7r7Sa'></tbody>
                • 本文介绍了如何确定mysql索引是否完全适合内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有没有办法确定 mysql 索引是否完全适合可用内存?如果是这样,我会怎么做:

                  Is there a way to determine whether a mysql index fits entirely in available memory? If so, how would I:

                  • 确定 mysql 索引的大小
                  • 确定应用程序的可用内存
                  • 确定索引是否完全适合内存

                  推荐答案

                  取决于存储引擎

                  SELECT FLOOR(SUM(index_length)/POWER(1024,2)) IndexSizesMB
                  FROM information_schema.tables WHERE engine='MyISAM' AND
                  table_schema NOT IN ('information_schema','performance_schema','mysql');
                  

                  key_buffer_size 中减去它.如果答案>0,然后是

                  Subtract that from key_buffer_size. If the answer > 0, then Yes

                  SELECT FLOOR(SUM(data_length+index_length)/POWER(1024,2)) InnoDBSizeMB
                  FROM information_schema.tables WHERE engine='InnoDB';
                  

                  innodb_buffer_pool_size 中减去它.如果答案>0,然后是

                  Subtract that from innodb_buffer_pool_size. If the answer > 0, then Yes

                  我在 DBA StackExchange

                  在专用数据库服务器上,确保 InnoDBSizeMB+IndexSizesMB 不超过 RAM 的 75%.

                  On a dedicated DB Server, make sure InnoDBSizeMB+IndexSizesMB does not exceed 75% of RAM.

                  这篇关于如何确定mysql索引是否完全适合内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:一级索引和二级索引到底有什么区别? 下一篇:Laravel 的“soft_delete"是否会被删除?需要在 MySQL 上建立索引吗?

                  相关文章

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

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

                    3. <small id='bd4ML'></small><noframes id='bd4ML'>

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