MySQL性能:单表或多表 [英] MySQL Performance: Single table or multiple tables

查看:165
本文介绍了MySQL性能:单表或多表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有8组数据,每组大约30,000行,这些数据是相同的结构,只是用于不同的语言.

I have a 8 sets of data of about 30,000 rows for each set, the data is the same structure just for different languages.

该网站的前端将获得相对较高的访问量.

The front end of the site will get relatively high traffic.

所以我的问题是关于MySQL的性能,如果我应该有一个带有一列的表来区分数据所属的集合(即大写的语言")还是为每种语言集创建单独的表?

So my question is regarding MySQL performance, if i should have a single table with one column to distinguish which set the data belongs to (i.e. coloumn "language") or create individual tables for each language set?

(解释为什么可能会有帮助)

(an explanation on why if possible would be really helpful)

先谢谢了 沙迪

推荐答案

我会使用单表设计.无论表有多宽",具有正确索引的查找时间都应该完全相同.

I would go with single table design. Seek time, with proper index, should be exactly the same, no matter how "wide" table is.

除了性能问题之外,这还将简化设计以及与其他表(外键等)的关系.

Apart from performance issues, this will simplify design and relations with other tables (foreign keys etc).

这篇关于MySQL性能:单表或多表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆