Subtable type stucture in MySQL -
i know if possible have following database behaviour:
- create user table, primary key user_id
- data comes in external source: e.g. "user_id, timestamp, data"
- for each user in user table, create table store data entries pertinent user_id, , store incoming data correct user_id table
- when querying data entries specific user_id, return rows table.
i of course in 1 table "alldatalog" , search entries in alldatalog contain user_id, concern alldatalog table grows, searches take long.
you should not split tables that. want index on user_id column in data log table. searches become slower data size increases, strategy not mitigate that. make application more complex write, harder debug, , quite slow down.
you should consider unpacking data blob additional columns , tables appropriate in order take advantage of relational nature of database.
how many rows expect table hold on time? thousands? millions? billions? @ rate expect rows added?
Comments
Post a Comment