Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL server Partitioned table and entity framework

Can we get the benefits of the partitioning of a SQL server 2010 table when we use entity framework as the data layer? The table will have 10 000 records per day and it will be partitioned by the date created (Ex :- Older than 30 days and new)

like image 408
Jayantha Lal Sirisena Avatar asked Jul 13 '26 09:07

Jayantha Lal Sirisena


1 Answers

I'm not very skilled in SQL Server so perhaps I'm wrong but I believe that table partitioning should be transparent to queries (if we are talking about automatic partition function defined in the table) - it means that common queries should still work and even have better performance if partitioning is configured correctly. So in case of database-frist design, EF should not have any problem with this because it still works with single logical table. If you mean manual partitioning by creating new table each month then it is a big probrem with EF and you will need stored procedures to access that tables.

like image 106
Ladislav Mrnka Avatar answered Jul 18 '26 03:07

Ladislav Mrnka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!