Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Performance: Single table or multiple tables

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.

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)

Thanks in advance Shadi

like image 686
Shadi Almosri Avatar asked Jan 23 '23 09:01

Shadi Almosri


2 Answers

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).

like image 75
leafnode Avatar answered Feb 04 '23 09:02

leafnode


Another drawback to the "one table per language" design is that you have to change your schema every time you add one.

A language column means you just have to add data, which is not intrusive. The latter is the way to go.

like image 39
duffymo Avatar answered Feb 04 '23 09:02

duffymo