U
U
UngVas2014-03-31 15:10:53
SQL
UngVas, 2014-03-31 15:10:53

EF, why is the select query running so much slower than usual?

Kind ))
Task: Last week the task was to attach server pagination to one report.
Used by:
MS SQL
.Net
Entity Framework
Web Api
Problem: The data fetch query is very slow.
Solution: first I checked this query in SQL Management and it turned out that it works slowly here too, and all because there are no indexes in the database. I added indexes and, lo and behold, the query was executed instantly both in SQL Management and in the application.
The task was solved, but when I returned to work today, I decided to double-check, and found that pagination in the application was again slow, but in SQL Management it was fast.
I decided to write in detail, because I think I made a mistake somewhere. What could be?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Plotnikov, 2014-03-31
@ilyaplot

Turn on profiling and see what happens.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question