I’m new to mysql and have a choice regarding mysql database structure for my new database. I can have:
table1:(ID,text1,text2,text3,text4,up to text7)
OR
table1:(ID,int1,int2,int3,…up to int7) where the int values link to table 2 unique index
table2:(ID2,text)
So basically, should I put all text in columns in a single table or saparate and store index values in 1 table and the text data in a second table…
queries will be given ID code, to return strings text 1 to text 7. Table will be large, about ~1 million ID’s (meaning table 2 if method 2 is used would have ~7 million entries)
which method would be faster in your opinion?
EDIT1: Each text is 250 letter characters in length.
EDIT2: To clarify, I am given the ID and the query to the table would be getting all 7 text items for that ID. This is the only query that will be done on the tables and the only information ever required. Just need to know which would be faster to use. If neither, please offer a better way!
Won’t make any speed difference if you’re not querying based on the text. Keep it simple and just use 1 table. If you have to query by the text, then you’re going to want to change it.