Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Data Model Wizard Too Slow (SQL Database)

Using: visual studio 2012 Ultimate, ADO Entity Framework 6, Database: Sql express 2014 (installed on local PC), Database tables count: 174 table.

I am trying to create database model using Entity Data Model Wizard but it takes about 8 hours to create the model(Dialog not responding).

I tried to reinstall visual studio & Entity Framework but the same problem. I need any ideas that can speed up database model creation.

First imageSecond imageThird image

like image 409
Mohamed Al-Hosary Avatar asked May 05 '15 12:05

Mohamed Al-Hosary


People also ask

Why is MY SQL Server so slow?

There are many different parameters involved in the slow performance of the SQL Server and the biggest one is the proper deployment. Here are the common mistakes: … and many more I often discuss during the health check.

Why is MY SQL query taking so long?

They can take time to transform the data, which can really add up if you’re selecting a lot of data. Using functions in a Where clause or Join clause can also slow down your query. For example, if you filter on an uppercase word, then the value in every row needs to be converted to uppercase to do the conversion:

What leads to the poor performance of SQL Server?

Here is a quick list that leads to the poor performance of the SQL Server. You may find it surprising lots of people start building a schema without fully grasping the requirements and that leads to poor design at the beginning which leads to very complex queries and terrible server performance.

How long does a LinQ2 Entity Framework Code-first query take?

I'm seeing some really strange perf related to a very simple query using Entity Framework Code-First with .NET framework version 4. The LINQ2Entities query looks like this: context.MyTables.Where (m => m.SomeStringProp == stringVar); This takes over 3000 milliseconds to execute. The generated SQL looks very simple: SELECT [Extent1].


2 Answers

What worked for me is I changed my database compatibility back to 2012 before updating the model.

In SQL Management Studio, right-click on Database.

Properties-> Options -> Compatibility Level -> SQL Server 2012 (110)

like image 97
PretoriaCoder Avatar answered Oct 17 '22 22:10

PretoriaCoder


Updating to Cumulative update package 5 for SQL Server 2014 fixes this issue, see https://connect.microsoft.com/VisualStudio/feedback/details/829555/visual-studio-freezes-during-entity-framework-db-reverse-engineering. The update is available at https://support.microsoft.com/en-us/kb/3011055

like image 22
Grant Castner Avatar answered Oct 17 '22 22:10

Grant Castner