How to create the right structure for analytics service? Currently, I have 1 table that stores data about all users who visit the page with my client ID, so that later my clients can see statistics for a certain date.
Today I thought a little, and Iām curious: let them say that I have 1000 users, and each of them receives about 1000 hits on their sites every day, so every day I get 1,000,000 new entries in one table. How will it work in 2 months or so (when the table reaches 60 million records)?
I just think that after a while it will have so many records that the PHP requests to pull out the data will be really heavy, slow and take a lot of resources, right? and how to prevent this?
My friend, working on something similar, and he is going to create a new table for each client, is this the right way?
Thanks!
source share