MySQL BLOB数据是否在同一个表中

I have one varchar and two BLOB types of data for recipes. I don't need relations between data. For example I don't need to know which meals need potato etc.

I'll get meal's materails from database, edit them and save them again as BLOB. Then I will create a binary text file (~100KB) on the fly and save it in another column named binary data.

So my question is, does splitting table into two makes sense? Putting one BLOB in one table and another BLOB in another table changes performance (in theoretically). Or doesn't it change anything except backup issues ?

+-id--+-meal name (varchar)----+-materials (BLOB)------------+-binary data (BLOB)---+
| 1   | meatball               | (meat, potato, bread etc.)  | (some binary files)  |
| 2   | omelette               | (potato, egg, etc.)         | (other binary files) |
+-----+------------------------+-----------------------------+----------------------+

If you will be using a ORM, better use the split table approach. Otherwise, when you ask for the materials, the ORM will usually fetch all available fields... So reading big and unnecessary "binary" objects.

On other side of things... If you'll serve the binary results, a better approach would be to save the files and serve them directly.

It's more a design choice than a specific performance improvement. This assumes your query is not doing a catch-all "SELECT *". Your queries should always target the specific columns you are interested in for a given purpose.

If you do not anticipate the BLOB types for a specific meal growing past your current expectation, then keeping it in one table is an appropriate choice. This is assuming there is a one-to-one relationship between them.

However, if there is any chance there might be any need for more BLOB objects for a meal, then yes I would consider splitting it out to a new table and cross-references. Somtimes, it is better to be safe than sorry though.