久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='MxFkR'></tfoot>

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

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

        MySQL 中的 NULL(性能和存儲)

        NULL in MySQL (Performance amp; Storage)(MySQL 中的 NULL(性能和存儲))
        <tfoot id='mo41D'></tfoot>

          • <bdo id='mo41D'></bdo><ul id='mo41D'></ul>

              <tbody id='mo41D'></tbody>
          • <small id='mo41D'></small><noframes id='mo41D'>

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

                  本文介紹了MySQL 中的 NULL(性能和存儲)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  在 MySQL 中,null 在性能和存儲(空間)方面究竟有什么作用?

                  What exactly does null do performance and storage (space) wise in MySQL?

                  例如:

                  TINYINT:1 個字節TINYINT w/NULL 1 字節 + 以某種方式存儲 NULL?

                  TINYINT: 1 Byte TINYINT w/NULL 1 byte + somehow stores NULL?

                  推薦答案

                  這取決于您使用的存儲引擎.

                  It depends on which storage engine you use.

                  在 MyISAM 格式中,每個行標題包含一個位域,每列有一個位來編碼 NULL 狀態.NULL 列仍會占用空間,因此 NULL 不會減少存儲空間.請參閱 https://dev.mysql.com/doc/internals/en/myisam-introduction.html

                  In MyISAM format, each row header contains a bitfield with one bit for each column to encode NULL state. A column that is NULL still takes up space, so NULL's don't reduce storage. See https://dev.mysql.com/doc/internals/en/myisam-introduction.html

                  在 InnoDB 中,每一列在行頭中都有一個字段起始偏移量",每列一個或兩個字節.如果該列為 NULL,則該字段起始偏移量中的高位打開.在這種情況下,該列根本不需要存儲.因此,如果您有很多 NULL,則您的存儲空間應該會顯著減少.請參閱 https://dev.mysql.com/doc/internals/en/innodb-field-contents.html

                  In InnoDB, each column has a "field start offset" in the row header, which is one or two bytes per column. The high bit in that field start offset is on if the column is NULL. In that case, the column doesn't need to be stored at all. So if you have a lot of NULL's your storage should be significantly reduced. See https://dev.mysql.com/doc/internals/en/innodb-field-contents.html

                  NULL 位是行標題的一部分,您不要選擇添加它們.

                  The NULL bits are part of the row headers, you don't choose to add them.

                  我能想象 NULL 提高性能的唯一方法是,在 InnoDB 中,如果行包含 NULL,則一頁數據可能適合更多行.所以你的 InnoDB 緩沖區可能更有效.

                  The only way I can imagine NULLs improving performance is that in InnoDB, a page of data may fit more rows if the rows contain NULLs. So your InnoDB buffers may be more effective.

                  但如果這在實踐中提供了顯著的性能優勢,我會感到非常驚訝.擔心 NULL 對性能的影響屬于微優化領域.你應該把注意力集中在其他地方,在那些能帶來更大收益的領域.例如添加精心挑選的索引或增加數據庫緩存分配.

                  But I would be very surprised if this provides a significant performance advantage in practice. Worrying about the effect NULLs have on performance is in the realm of micro-optimization. You should focus your attention elsewhere, in areas that give greater bang for the buck. For example adding well-chosen indexes or increasing database cache allocation.

                  這篇關于MySQL 中的 NULL(性能和存儲)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環數組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)
                1. <tfoot id='Rcq2U'></tfoot>
                  <i id='Rcq2U'><tr id='Rcq2U'><dt id='Rcq2U'><q id='Rcq2U'><span id='Rcq2U'><b id='Rcq2U'><form id='Rcq2U'><ins id='Rcq2U'></ins><ul id='Rcq2U'></ul><sub id='Rcq2U'></sub></form><legend id='Rcq2U'></legend><bdo id='Rcq2U'><pre id='Rcq2U'><center id='Rcq2U'></center></pre></bdo></b><th id='Rcq2U'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Rcq2U'><tfoot id='Rcq2U'></tfoot><dl id='Rcq2U'><fieldset id='Rcq2U'></fieldset></dl></div>

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

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

                            <bdo id='Rcq2U'></bdo><ul id='Rcq2U'></ul>
                              <tbody id='Rcq2U'></tbody>
                          • 主站蜘蛛池模板: 一级黄色录像毛片 | 91精品国产综合久久小仙女图片 | 国产成人综合在线 | 日本不卡一区 | 欧美视频成人 | 国产一级一级国产 | 另类在线 | 日本成人综合 | 99爱在线| 精品国产黄a∨片高清在线 www.一级片 国产欧美日韩综合精品一区二区 | 中文字幕在线第二页 | 亚洲精品福利在线 | 精品一区二区三区在线观看国产 | 成人h视频在线 | 日韩av在线免费 | 亚洲美乳中文字幕 | 羞羞的视频网站 | 天天干天天操天天看 | 久久国产精品视频观看 | 日韩在线不卡 | 国产精品一区在线 | 久久99网 | 一级毛片免费完整视频 | 男人天堂国产 | 久久久观看 | 在线啊v| 91久久精品一区 | 视频一区二区三区在线观看 | 密色视频 | 黄a在线观看 | 国产精品美女www爽爽爽 | 犬夜叉在线观看 | 国产激情一区二区三区 | 久久久蜜桃 | 91大神新作在线观看 | 久久久久久久国产 | 日韩精品一区二区三区在线观看 | 天天精品在线 | 国产一区二区三区高清 | 人人看人人搞 | 午夜影院在线免费观看视频 |