Entity Framework and sharded database

元气小坏坏 提交于 2019-12-09 12:59:53

问题


I have a WCF Data Service running on top of a Entity Framework code first 4.1 provider. The database is quite large (one key table has 77+ million records and grows by ~10% per month) and has presented quite a performance problem. While sharding a database that large is a pain it seems inevitable. My question is, has anybody successfully implemented EF with a sharded database and, if so, do you have any guidance?


回答1:


Have you investigated the following options:

  1. Clustering your DB (I assume it's SQL Server you are using)?
  2. Extracting some of your data (archived records, for example) into another table, then create a view with a UNION query to join the two tables together when you need a complete dataset view?
  3. Does your table have indices on it - if not, have you tried creating one?



回答2:


You can scale out databases with the MS shard map manager.

See Elastic database tools https://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-scale-introduction/

and in particular Shard map manager https://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-scale-shard-map-management/



来源:https://stackoverflow.com/questions/9540901/entity-framework-and-sharded-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!