The site has a kind of system "lobby". In what form is it better to store data about these lobbies and what is happening in them? Is it better that each lobby is a separate table and what is happening is entered into this very separate table? Or is it better to create two tables, "lobbies" and "records" and establish connections and correspondences?

  • 2
    Two tables. The pattern with the table for each entity is never justified, especially if there is a repeating structure. Indexes grow with logarithmic complexity, so there is little difference, as much as in the data table, as long as indices are used. - etki
  • @Etki And if there is a condition that the created lobby, after performing its function, is deleted? And a large number of lobbies are constantly being created and deleted every 5-10 minutes. Does this have any effect on your answer? - Bim Bam
  • 3
    No, this is still normal functioning for the database. Moreover, in the case of a table life of five to ten minutes, you risk sooner or later to encounter the problem of heisenbags: there was some kind of error in the lobby, and it is impossible to analyze it because there are no traces in the database. Moreover, the lobby does not have to be deleted, you can simply add the is_closed field just for the next storage and analytics. Always have time to delete) - etki

0