2

Can anyone explain what should be seen in SQL profiler when navigating through a CRUD application window, in order to confirm it's correctly and efficiently performing the sql statements?

I opened up SQL Profiler and filtered on EntityFramework Application and .....

Selected the Index page: I'm using PagedList so expected to see either a fetch of all the rows in the table or the first 10 based on the page size. I can see a Select for each individual row nested in an Audit Login / Logoff. Is this how it should be with EF? It concerns me that this will prove slow with a few a large number of records?

Selected the Create Page: Entered page and not entered anything, yet the Profiler’s shows a Select performed. Don’t know why but can live with that?

Selected the Details Page: The Profiler’s shows a 4 Selects performed. Don’t know why but there’s a lot of opening closing connections too.

....Similar stories with Edit and Delete.

Can somebody point me in the right direction on how to use EF efficiently?

Thanks in advance!

1 Answer 1

4

In profiler, we can see important information such as, for example, how many queries the database is running, how long are demanding these consultations, which database query which is running and so on.

To use EF efficiently, the links bellow may help you.

http://www.asp.net/entity-framework/tutorials/maximizing-performance-with-the-entity-framework-in-an-asp-net-web-application

http://afana.me/post/entity-framework-multiple-result-sets.aspx

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks mate for the links and quick response!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.