Search code examples
mysqldatabase-partitioning

Many tables or one big table with horizontal partitioning


I'm design database for new project. I need to create a custom multi-chat system but I have a question: many tables (one for one chat) or one big table with horizontal partitioning ? My database is mysql and the chat are isolated each other.

I ask this because the project may potentially have many chat.


Solution

  • Don't be afraid of large tables. I am using a partitioned table with 1.5 billion records. By using the right indexes the performance of queries and views is still split second. I agree with the isolation remarks of the other contributors.