I am going to implement a favorite post system so users can save their favorite posts for later reading.
I want to know what is the best approach for doing it taking into considaration the possibility that hundreds of thousands of users will use this function. Users will be able to see their favorite posts in a custom page that will them.
I have thought of 3 different poissibles ways, I want to know which one would be the best performance wise.
1.- Saving all user ids as an array in a postmeta called favorites.
2.- Making a custom post type called favorites.
3.- Creating a new database table ‘wp_favorites’ that stores the post id, user id, and date of the created relationship.
So, which of those three would the best (as I said, performance wise)? And, what would be the pros and cons of each if any? If there is even a better way, please let me know.