Jump to content
Sign in to follow this  
GPT

One table with milions records or many tables with thousand records?

Recommended Posts

Hello,

 

I have Events and Tickets​ tables.

 

In Tickets table I have at least the following fields:

 

EventsID

CustomersID​

TicketNo

...

 

The number of tickets for an event varies between 500-20,000. That means the number of records after 100 events may be 50,000-2,000,000.

 

I wonder if it is better for each event to have a different table, which means I have 100 tables with 500-20,000 records in each.

 

Which design is better for selecting/querying customers records?

 

Thanks in advance.

Edited by GPT

Share this post


Link to post
Share on other sites

It's never a good idea to dynamically create tables. Database are designed to handle millions of records, so I would recommend having just one table for the tickets.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...