Do the background to start the site to consider some of the background to the database operations, such as minimizing the number of queries, release the connection as soon as possible, only select the required fields and so on. If you are using three-tier development, complex projects directly assembled SQL statements a little more, the assembled SQL statement can be run directly in the SQL Server Management window, for EF is not, if you want to view the final SQL statement can only use SQL Server Profiler ( Currently only know this, if there are other hope to enlighten you in the SQL Server Management window has an option SQL Server Profiler Click Open, will open a new window, log in to the database can be monitored. There is a monitoring template in the monitoring options, I generally choose tsql, because there are many monitoring SQL statements, this template can also see the login audit, stored procedures and other information. The mouse check record can see the detailed execution of the SQL statement, very convenient.
SQL Server Profiler Monitoring database activity