MySQL one table or more for different products types? -


Say I'm selling on my site, song or album. Is it better to have only one table with a 'type' or a type of table, in case of display only? The fields are very similar.

Thank you.

It relies entirely on how many records you are expecting, and what kind of If you are looking at millions of people of all types, then they may be more demonstrative to split into different tables, but if you add indexes to the correct column, then it will be for a table. It'll be fine.

A table is good for simplicity - you can only filter the type of type that you want to do with the Type column. Just make sure that you point to that column, otherwise when you start to get many records at once, it actually gets spoiled, but without any number of things you know that in the long run it is enough Its difficult.

Maybe someone else can discuss DBA knowledge here, but I will say

  • If you want the best possible performance - splitting tables < / Li>
  • If you do not mind what the millisecond difference will be - a single table

As @Sendor Wisar has mentioned, if you want to be able to search for a full text through all your items for sale, then a table would be better this 3 Trying to do more than tables will be a bit easier because you will have more than 3 different questions (or federal questions), which can be slower than a table search.

Given that you see the difference between very short time between 1 table and 3 table implementation on normal operation, I recommend a single table approach.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -