久久久久久久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 個字節(jié)TINYINT w/NULL 1 字節(jié) + 以某種方式存儲 NULL?

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

                  推薦答案

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

                  It depends on which storage engine you use.

                  在 MyISAM 格式中,每個行標題包含一個位域,每列有一個位來編碼 NULL 狀態(tài).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 中,每一列在行頭中都有一個字段起始偏移量",每列一個或兩個字節(jié).如果該列為 NULL,則該字段起始偏移量中的高位打開.在這種情況下,該列根本不需要存儲.因此,如果您有很多 NULL,則您的存儲空間應(yīng)該會顯著減少.請參閱 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,則一頁數(shù)據(jù)可能適合更多行.所以你的 InnoDB 緩沖區(qū)可能更有效.

                  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.

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

                  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.

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

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

                  相關(guān)文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數(shù)根據(jù) N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結(jié)果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數(shù)的 ignore 選項是忽略整個事務(wù)還是只是有問題的行?) - IT屋-程序員軟件開發(fā)技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環(huán)數(shù)組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調(diào)用 o23.load 時發(fā)生錯誤 沒有合適的驅(qū)動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數(shù)據(jù)庫表作為 Spark 數(shù)據(jù)幀讀取?)
                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精品国产综合久久久亚洲 | 欧美日韩高清在线一区 | 91视频进入| 一区精品视频在线观看 | 人人做人人澡人人爽欧美 | 日韩欧美国产精品 | 福利视频1000 | 久久精品色欧美aⅴ一区二区 | www.成人免费视频 | 中文字幕第二十页 | 日韩精品成人 | 精品国产精品三级精品av网址 | 伊人网91| 日韩视频区 | 日韩a在线 | 91麻豆精品一区二区三区 | 欧美456| 亚洲精彩免费视频 | 欧美一区二区三区视频在线观看 | 午夜精品久久 | www.成人免费视频 | 99精品视频在线 | 日韩a | 超碰人人艹 | 国产99久久久国产精品 | 精品一二区 | 中文字幕久久精品 | 日本又色又爽又黄又高潮 | 伊人手机在线视频 | 美女福利网站 | 国产视频福利在线观看 | 午夜伦4480yy私人影院 |