i'm thinking about something. Consider a table "messages" which stores messages between member. This table can potentially billions messages. Looking for all message from a message would become a long query (in term of time) is it a good idea to put last message in a dedicated table ? So each entry in the table 'last_message' looks like
id | msg | user_pk
This table is updated each time a user add a new message, the previsous one goes to the table "message" So each time we look for all last message we just have to look into the last_message table which contains less data than "messages"
To me the main advantage is the request speed, the disadvantage is the data management bewteen "messages" and "last_messages" tables and update requests.