mysql大表or小表?
PHPz
PHPz 2017-04-17 11:39:01
0
2
615

facebook采取的设计原则是把表设计的竟可能小,但小表岂不是要频繁join,假如根据一张表中的数据再逐一去取另一表数据会导致mysql连接数飞起?

倘若用大表保持一定冗余性,这种情况对与facebook之类sns网站海量数据会不会导致很快进入瓶颈?

PHPz
PHPz

学习是最好的投资!

reply all(2)
左手右手慢动作
  1. Of course, small tables are better, reducing IO and easy to expand (for example, when adding fields, there is no need to modify the main table)
  2. As for the join problem you mentioned, it does not exist, because Internet applications generally do not allow join operations. There are two reasons. One is the slow speed, and the other is that you will split the database and tables in the future. What should I do?
  3. What should I do if there is a need to join in business? --In-memory processing
大家讲道理

Personally, I think it is more reliable to split it into small tables and join in memory.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template