Answer the question
In order to leave comments, you need to log in
What is the best way to organize a MySQL table?
You need to write down several million blocks with numbers.
There are two options.
1. For each entry, make a separate line in the table, it will look like this:
2. Combine the numbers into a line, delimit the blocks with the '|' symbol, and write the numbers themselves through a semicolon. And all this is to put a table with the MEDIUMTEXT type in one line, and process them on the server already during the select: for example, in PHP using explode (). This will be about 1000 times fewer rows in the table.
Then it will look like this:
Which option will work faster if you need to access the table once a minute and extract data for the first case: about 1000 rows, and for the second option - one row.
And how fast will explode work if there are approximately 1000 future array elements in a row?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question