mysql中一個表,假設主鍵為id並且自增,那麼id變得特別大會造成什麼後果?

來源:互聯網
上載者:User
關鍵字 php mysql
403102    圖文統計    0    unileverexpiry/websitearticle/index    403    3    rw    y            403103    素材分組    0    material/admin/group    403    1    rw    n            

上面是資料庫中最大的資料。

回複內容:

403102    圖文統計    0    unileverexpiry/websitearticle/index    403    3    rw    y            403103    素材分組    0    material/admin/group    403    1    rw    n            

上面是資料庫中最大的資料。

如果 你是用 int 他的範圍是
從 -2^31 (-2,147,483,648) 到 2^31 – 1 (2,147,483,647) 的整型資料(所有數字)。儲存大小為 4 個位元組,應該也夠用了

這個確實有可能會出在溢出的情況,不過還是要看PHP是32位的還是64位的,不過對於MySQL來說,它能夠儲存的範圍,基本上不太用考慮溢出問題把。

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.