Entity platform performance issue

I'm having performance issues with an entity, when the first request for an application is executed, it takes about 20 seconds. I checked the actual query execution time on the sql server with the sql server profiler, which takes some seconds. After the first request, others work ok.

A query is an extremely simple selection from a table in which only one row is inserted. A DB consists of about 200 tables, but nothing represents any indexes, views ... I saw how some other people also had similar problems with the first query, but I could not find a solution. Any idea what is really going on?

Ok this request

        DBEntities en = new DBEntities();

        var person= (from p in en.People
                           select p).First();
        this.txt1.Text = person.name;
+3
source share
3 answers

Although the SQL query takes milliseconds, creating SQL inside EF may take some time at first run. Especially if it's a complex query / model. Take a look at this article that explains how you can pre-create to increase productivity. Pre-create Views

+1
source

( 300), . , . , . , , . , .

0
0

Source: https://habr.com/ru/post/1778123/


All Articles