News Database Database Performance

Greetings All, I saw similar questions asked earlier, without final or verified answers.

I am developing a news system using PHP / MySQL similar to facebooks. Seeing that this table can grow quite large - any inefficiency can lead to a significant bottleneck.

Notification example: (Objects in bold are related objects)

User_A and USER_B commented on a new user album.

User_A added a new car to [his] garage.

I originally implemented this using redundant columns for Obj1: Type1 | Obj2: Type2 | etc..

It works, but I'm afraid that it is not scalable enough, now I am looking for serialization of objects.

So, for example, my new database is set up like this:

News_ID  |  User_ID  |                 News_Desc            |   Timestamp

  2643         904     {User904} and {User890} commented on     SomeTimestamp
                       {User222} new {Album724}.

Everything inside {represents data that will be serialized using JSON.

Is this a smart (efficient / scalable) way to move forward?

Would it be difficult to separate serialized data from the rest of the string using regular expressions?

+3
source share
1 answer

, User890 ? , - , () actioner (User890), " " . , /.

+2

Source: https://habr.com/ru/post/1728114/


All Articles