如果我的信息表已满,我该怎么办?

时间:2022-02-13 06:47:04

I have a table in MYSQL holding the messages in a message system. My table is :

我在MYSQL中有一个表,用于在消息系统中保存消息。我的表是:

messages(from_id, message, date, hash)

I know that a table can hold a certain number of records. What can I do if my table holding my messages is full? Can I create a new table like that I already have and start moving the next messages to it? Any ideas how can I do this? Thanks

我知道一张桌子可以容纳一定数量的记录。如果我的信息表已满,我该怎么办?我可以创建一个像我已有的新表并开始将下一条消息移动到它吗?任何想法我怎么能这样做?谢谢

3 个解决方案

#1


0  

The only way the table you describe can be full is if your disk is full. Why not delete older messages?

如果您的磁盘已满,您描述的表可以填满的唯一方法。为什么不删除旧邮件?

#2


0  

There's no real size limit on MySQL tables (see documentation). At some point, maybe you can archive old messages.

MySQL表没有实际的大小限制(参见文档)。在某些时候,也许您可​​以存档旧邮件。

#3


0  

What do you mean, full? You've reached the max range supported by from_id? Then you've got two main choices:

你是什​​么意思,完整?你已达到from_id支持的最大范围?然后你有两个主要的选择:

  • convert from_id from signed -> unsigned, which will double your supported ID range (0->2x instead of -x -> +x)
  • 转换from_id从signed - > unsigned,这将使您支持的ID范围加倍(0-> 2x而不是-x - > + x)

  • convert from_id from int -> bigint, which takes you from a 32bit number to 64bit.
  • 转换from_id从int - > bigint,它将你从32位数转换为64位。

#1


0  

The only way the table you describe can be full is if your disk is full. Why not delete older messages?

如果您的磁盘已满,您描述的表可以填满的唯一方法。为什么不删除旧邮件?

#2


0  

There's no real size limit on MySQL tables (see documentation). At some point, maybe you can archive old messages.

MySQL表没有实际的大小限制(参见文档)。在某些时候,也许您可​​以存档旧邮件。

#3


0  

What do you mean, full? You've reached the max range supported by from_id? Then you've got two main choices:

你是什​​么意思,完整?你已达到from_id支持的最大范围?然后你有两个主要的选择:

  • convert from_id from signed -> unsigned, which will double your supported ID range (0->2x instead of -x -> +x)
  • 转换from_id从signed - > unsigned,这将使您支持的ID范围加倍(0-> 2x而不是-x - > + x)

  • convert from_id from int -> bigint, which takes you from a 32bit number to 64bit.
  • 转换from_id从int - > bigint,它将你从32位数转换为64位。