Mysql – Is there benefit from having 2 tables for 1 entity

MySQLmysql-5.7performance

I'm using mysql 5.7
I'm making app that has 2 activities: list of entities and viewing single entity (full).

The full entity has 7 related entities and 100 columns.

On the list activity I need only 5 columns and 2 related entities.

I'm thinking if I make separate table for the listing (5 columns + 2 related entities) denormalized. And then when searching through normalized columns get only ids. And get all deneromalized stuf with single where id in 1,5,7 manner.

Would it singificantly increase performance or should i don't bother?

I'm making an android app and want the best speed i can get but dunno if it really matters

Best Answer

Generally it is best to hold data in a normalised structure.

If testing at scale, on production-grade hardware, proves there is a problem, and that the problem is because of an over-large table, and index tuning and SQL re-factoring do not bring the problem withing acceptable bounds, then splitting the table is a recognised technique.

Moving some rows to a different table is called horizontal partitioning or sharding. Moving some columns to a different table is call vertical partitioning. Both entail additional design and maintenance work. There will be run-time implications if values from several partitions are required by a single query.

There is some further discussion at this answer.