I have a web application that contains products and users. There are 10,000+ products and 100,000+ users to give a sense of the scale that’s required.
For some application specific reasons, I need to track which products have been seen by which users. For example, Productid1 was seen by User1 but not Productid3000.
I’m thinking of a solution using MySQL where I would add another table called “Seen Products” having two columns: ProductId and UserId. Any time a product is seen by a user, I would add a new row to this table. To see whether a product has been seen by a user, I would then check the first ProductId in my Product table that is not in the Seen Table for a particular user.
However, I’m worried about the scalability of calling this multiple times (50+) per user in a user session. Would MySQL tables be fast/scalable enough to achieve this task? What would an optimal way to achieve this requirement?
kitkat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.