In the case above if the Modified Date field was included in an index it would run faster.When running this query and turning time statistics on () one can see that the entire process takes less than a second: SQL Server Execution Times: CPU time = 15 ms, elapsed time = 87 ms.He is driven by the love of technology and a desire to solve complex problems creatively.
To get started let's do the following: Since 2002, Jeremy Kadlec has delivered value to the global SQL Server community as an Edgewood Solutions SQL Server Consultant, co-founder and Baltimore SSUG co-leader.
SQL Server cursors and any other type of cursors date back to before procedural programming languages could handle sets of data and required to by split into rows (E.g.
COBOL, FORTRAN, old style C etc.) So in that regard they are just plain old-fashioned.
Take this simple SELECT statement as an example: When you write a SELECT statement like this (that returns 1051 rows) to fetch a bunch of data from that database the system receives the statement and creates or uses an existing query plan, then it uses indexes to locate the data on the disk, fetches the data in one foul swoop and returns the data as a set.
If your indexes are correctly placed the query can be sped up.