Sample Header Ad - 728x90

One big table vs few smaller

7 votes
1 answer
7224 views
**Please take note that the example below is just an example, my scenario is way more complex and the way i'm trying to model it really makes sense** Let's say i'm creating a table for audit events in one of my apps - so all of the "event_created", "user_created" etc. kind of thing. The table contains several columns, some of them are a foreign keys to other tables. Over time, this single table can grow to several milion of records. From performance perspective, is it faster and more performant to use a single table for all of them or to use separate table for each kind of event and operate on separate tables? Or it doesn't make much differrence? It might sound silly to create a separate table for each kind of event but you need to trust me that in my real world scenario, it really makes sense.
Asked by mbajur (193 rep)
Oct 27, 2018, 08:13 AM
Last activity: May 2, 2020, 09:38 PM