【问题标题】:What happens when a table in a database has more rows than the max size of the index data type?当数据库中的表的行数超过索引数据类型的最大大小时会发生什么?
【发布时间】:2010-02-10 20:32:58
【问题描述】:

例如,如果我的表中有一个 unsigned int 索引,当我得到的行数超过 sizeof(unsigned int) 时会发生什么? 我对 MySQL/PostgreSQL/MsSQL 感兴趣。

【问题讨论】:

    标签: database database-agnostic


    【解决方案1】:

    您的问题是当行数超过 4 或 8 行时会发生什么情况(sizeof (unsigned int))。但我认为您的意思是当有 2^32(或 2^64)行时尝试插入行会发生什么?

    我从未见过它,而且我使用过一些非常大的数据库。我希望插入失败并导致事务回滚。它可以在 MySQL 中通过insert probe 感知。

    【讨论】:

      猜你喜欢
      • 2018-01-14
      • 2016-01-26
      • 2010-12-08
      • 1970-01-01
      • 2013-05-31
      • 1970-01-01
      • 2022-10-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多