【发布时间】:2014-03-25 19:14:44
【问题描述】:
假设我们有 10 亿条记录,并希望将它们按 post_type 存储在 One 或 Three 表中。
post_id -> primary key
post_type -> ( page, group, user )
user_id -> index
date -> index
注意:我们有足够的 RAM 来存储缓冲池中的所有数据。 (约 40 GB)
在我们的情况下,来自数据库的Reading 太多了
问题是:WHILE整个数据都在缓冲池(RAM)上,in performance 有3 分隔表和Join 它们有什么区别,或者有@987654328 @big table 和 Select 没有任何 Join。
在某些情况下,我们最好为其他类型的轻量查询使用单独的表。
但我们害怕JOINS。
【问题讨论】:
标签: mysql sql performance join innodb