A
A
Anchor002015-04-24 17:22:22
MySQL
Anchor00, 2015-04-24 17:22:22

Does the number of tables affect the speed of MySQL?

Let's say if there are a HUGE number of tables, several thousand or more? Example. There are attributes of goods - material, size. Attributes have SETs of unique values ​​(material - "plastic", "dihydro-ergo-cryptine"; size - "XM", "XL"). Question: how it is better to store the data (EXACTLY in terms of PERFORMANCE )? Option 1 - one table for all attributes and their values. Option 2 - a separate table for EACH attribute? (In this case, we have a bunch of tables BUT with a small number of records)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Kitaev, 2015-04-24
@Anchor00

How about an option to store the most common attributes in fields and the rest in a JSON field? Clearly better than a few thousand tables.

S
Stalker_RED, 2015-04-24
@Stalker_RED

MySQL has an enum field type. www.mysql.ru/docs/man/ENUM.html
Not suitable?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question