Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1997

How to build indexes for slow first execution SQL - SQL Server?

$
0
0
You may suffer from SQL statements with a slow first execution time due to the long data cache process. The following SQL is simple that retrieves records from the EMPLOYEE table that if EMP_SALARY < 500000 and the result set is ordered by EMP_NAME.

Select emp_id,
emp_name,
emp_salary,
emp_address,
emp_telephone​
from employee
where emp_salary < 500000
order by emp_name;

The following is the query plan that takes 9.51 seconds for the first...

How to build indexes for slow first execution SQL - SQL Server?

Viewing all articles
Browse latest Browse all 1997

Trending Articles