Best organization of the OBD table
-
What is it better to create in the table a field of kolvo_comments (when comments are made) or simply to count the number of notes in the table with commentaries? So there's no heavy load. Probably the first option?
-
In the table of comments, use:
SELECT COUNT(comments) FROM ...
It'll take a number of lines in the pole. If the move InnoDBthe sample will be quick and loaded on the server, skeletons, too.
If you create a column with the number of comments. You'll have to arrange either an automatic recalculation or permanently adding a comment, an extra +1 in the line. kolvo_comments♪
INSERT♪ UPDATEAnd especially automation, the server gets more tense than SELECT♪