Should I use a MySQL table in which all fields are of type TEXT NULL, and will it be retrieved using LIMIT? Will it affect performance?

There is a certain aggregating result of the sample, and the processing of this result takes some time, during which it is highly undesirable to change this selected data. I plan to save the entire result in a temporary table for further processing.

The problem is that the result is different, due to the dynamically generated fields in this result. I create a list of fields based on the first line of the result. Determining the types for each field does not work correctly, because it is not possible to determine the type precisely based on a single line.

  • *glitch* - Palmervan
  • I did not understand anything) can, for clarity, lay out the tables and what do you need to receive from them? - Ale_x
  • The essence of the question is: as mysql refers to a table in which all fields are of type text, an index is not assigned. Sampling from this table is performed in chunks - LIMIT n, 100. The data in this table may be different and null, there may be several lines of text. The catch is that it is impossible to determine in advance exactly which field names and which data set will be in this table. - istem
  • If to take in a general view - you need a repository of abstract data that you want to somehow parse on the client? The solution you propose is not the fastest ... but on the other hand, mysql initially uses variable length records ... so this is not as noticeable as on large databases. It is for your solution that it is better to use nosql databases. But the description of the data structure for the client-parser is desirable to keep. Well, at least somewhere separately ... in XML-form for example. - SilverIce
  • But the description of the data structure for the client-parser is desirable to keep. Well, at least somewhere separately ... in XML-form, for example, so that nebylo "Type definition for each field does not work correctly." If at the time of the parser launch you don’t know that it should parserit ... then there are sides in the solution architecture. - SilverIce

1 answer 1

Yes, thanks, already solved the question. The most likely types of fields are determined strictly, for the rest - left uncertainty (text). The performance is quite acceptable. Perhaps I will return to the question later and finalize it.