0

I'm working on an invoicing system using C#, MySql and the EntityFramework. The problem is that because of the large amount transactions, the purchase/sales invoices table will grow rapidly. However, I cannot have this affect performance. So I thought maybe I can archive the reacords or create a new table after every 'n' invoices (purchaesinvoices1..n) or a new table for each year. I originally thought this was a good approach, but now I think I might run into problems because I'm using the entity frameowrk. How would I map one entity (PurchaseInvoice) to the different tables, be able to select, update and etc.

Is there any way around my problem, is it even a good solution? I'm open to any suggestions people may have. Thanks in advance.

Saad Imran.
  • 4,480
  • 2
  • 23
  • 33

1 Answers1

2

I would rather just make sure you table has proper indexing applied. MySql should be able to handle a couple of million records a second. You can also use caching functionality to provide a preformance boost.

If I'm not mistaken Facebook used MySql and lets be honest that must work through a good million/100 million/trillion transactions a day.

Jethro
  • 5,896
  • 3
  • 23
  • 24
  • Umm, I guess you're right. I'm just a bit paranoid. What exactly do you mean by "proper indexing"? I've got one primary index that auto-increments called ID. – Saad Imran. Aug 02 '11 at 16:48
  • Check this post which explains what you should index. http://stackoverflow.com/questions/6165286/what-should-be-indexed-to-improve-performance – Jethro Aug 02 '11 at 16:53