消息传递 table 性能 - 将来自和到 id 的合并到一个字段与单独的 2 个字段

Messaging table performance - Merge from and to id`s into one single field vs separate 2 fields

以 "fromto" 形式合并来自 "messages" table 的用户 ID 对性能有何影响 - ex userID - 5, userID 9 => "59"与有两个单独的列 "from" 和 "to"?

流程 - 当两个 ID 在应用程序中可用时列出、读取、删除消息,因此查询将检索这 2 个用户的所有消息

此外,即使合并字段时性能会更好,这样做也是个好主意吗?

当您开始获得多于个位数的 ID 时会发生什么?

1111 等于什么? 1 比 111、111 比 1 还是 11 比 11?

坚持使用个别字段。这将更容易解释、管理和扩展。