Apr 29, 2011
We are working on a project that will feature real-time statistics of some actions (e.g. clicks).
View 2 Replies
On every click, we will log information like date, age and gender (these come from Facebook), location, etc.
We are discussing about the best place to store these information and use them for real-time stats. We will display aggregate statistics: for example, number of clicks, number of clicks made by male/female, number of clicks divided by age groups (e.g. 18-24, 24-30...).
Since on the site we are using MongoDB everywhere, my colleague thought we should store statistics inside it as well.I, however, would prefer a SQL-based database for this task, like MySQL (or maybe Drizzle), because I believe SQL is better when doing operations like data aggregation. Although there's the overhead of parsing the SQL, I think MySQL/Drizzle may actually be faster than No-SQL databases here. And inserts are not slow too, when using INSERT DELAYED queries.
Please note that we do not need to perform JOINS or collect data from multiple tables/collections. Thus, we don't care if the database is different.However, we do care about scalability and reliability. We are building something that will (hopefully) become very big, and we've designed every single line of code with scalability in mind.
What do you think about this?Is there any reason to prefer MongoDB over MySQL/Drizzle for this? Or is it indifferent?Which one would you use, if you were us?