1. <small id='tv3a6'></small><noframes id='tv3a6'>

    <tfoot id='tv3a6'></tfoot>

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

      MySQL 索引 NULL 值吗?

      时间:2023-10-25
      • <bdo id='W8Y0n'></bdo><ul id='W8Y0n'></ul>
      • <i id='W8Y0n'><tr id='W8Y0n'><dt id='W8Y0n'><q id='W8Y0n'><span id='W8Y0n'><b id='W8Y0n'><form id='W8Y0n'><ins id='W8Y0n'></ins><ul id='W8Y0n'></ul><sub id='W8Y0n'></sub></form><legend id='W8Y0n'></legend><bdo id='W8Y0n'><pre id='W8Y0n'><center id='W8Y0n'></center></pre></bdo></b><th id='W8Y0n'></th></span></q></dt></tr></i><div id='W8Y0n'><tfoot id='W8Y0n'></tfoot><dl id='W8Y0n'><fieldset id='W8Y0n'></fieldset></dl></div>

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

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

              • <legend id='W8Y0n'><style id='W8Y0n'><dir id='W8Y0n'><q id='W8Y0n'></q></dir></style></legend>
                本文介绍了MySQL 索引 NULL 值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个 MySQL 表,其中索引 INT 列对于 90% 的行将是 0.如果我将这些行更改为使用 NULL 而不是 0,它们是否会被排除在索引之外,从而使索引小 90% 左右?

                I have a MySQL table where an indexed INT column is going to be 0 for 90% of the rows. If I change those rows to use NULL instead of 0, will they be left out of the index, making the index about 90% smaller?

                推荐答案

                http://dev.mysql.com/doc/refman/5.0/en/is-null-optimization.html

                MySQL 可以对 col_name IS NULL 执行相同的优化,它可以用于 col_name = constant_value.例如,MySQL 可以使用索引和范围来搜索 NULLIS NULL.

                MySQL can perform the same optimization on col_name IS NULL that it can use for col_name = constant_value. For example, MySQL can use indexes and ranges to search for NULL with IS NULL.

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

                上一篇:MySQL中多列索引的字段顺序是否重要 下一篇:索引 MySql TEXT 列?

                相关文章

                  1. <small id='qBQBJ'></small><noframes id='qBQBJ'>

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

                  3. <tfoot id='qBQBJ'></tfoot>