Hi allCurrently I'm using MySQL for this, but it feels wrong. Usually I'm a big supporter of relational databases, and against non-relational databases, so this leads me to believe there must be something wrong with the backend DB I'm using.The schema is pretty simple:Customers have websitesWebsites have trafficThat's it.So it's basically an analytics product.The thing which has me feeling uncomfortable is this:Currently for each visitor we log the entire traffic object (user agent, IP, etc.), but we also separately log things we think are important (these are usually computed): IP, time spent on site, other sites this IP has visited, etc.So the row looks like this:IP, time spent on site, how many other sites this IP has visited today, how many other sites this IP has visited this week, etc.One of the reasons we store this sort of data in a row is because we have hundreds of millions of inserts per day. So instead of calculating the computed values each time the user loads their analytics panel, we just fetch the pre-computed values from the database.But this feels wrong.Can you relate to what I'm saying?Is there a better way to do this?Thank you.
Submitted January 16, 2019 at 02:39PM by rap_or_be_damned
No comments:
Post a Comment