N
N
Nikita Neskuchaev2016-10-13 15:28:53
MySQL
Nikita Neskuchaev, 2016-10-13 15:28:53

How to properly store statistical data in MySQL database?

Good day friends! Project: social platform. Several thousand users are constantly working on it. How to conduct splatter analytics for each user?
Each user performs actions, transactions. They must be stored in such a way that they can be "pulled out" at any time. Yes, sampling should also be present.
Tell me the right way! Create a separate table for each user? How to pull up the data will not matter at all.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2016-10-13
@begemot_sun

1. 10 million lines per week is not much.
2. Insert not one line at a time, but a bundle. It will be faster.
3. Keep several tables, for example, 1 table for each day. That. data decimation will be an elementary task.
4. Think about indexes.

A
Arseny Kravchenko, 2016-10-13
@Arseny_Info

For analytics, it is not optimal to use MySQL, it is better to look towards column bases . Although MySQL is also suitable for such a volume, broken down into tables by day, week or month.

R
romy4, 2016-10-13
@romy4

store everything in one table. a few thousand users is nonsense

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question