Search Results for “parameter sniffing”

  1. Home
  2. Search Results
  3. (Page 13)
SQL Server Internals 201 Training Class

SQL Server Internals 201

1 customer review
You’re a developer or database administrator, and you’re curious. You love learning about the internals of the tools you use. You’re comfortable writing queries and creating tables, but you don’t always understand why a particular index gets used, and another one does not. You’re not sure when SQL Server chooses to reuse an existing query…
Read More

Why sp_prepare Isn’t as “Good” as sp_executesql for Performance

sp_prepare For Mediocre You may remember me from movies like Optimize for… Mediocre? and Why You’re Tuning Stored Procedures Wrong (the Problem with Local Variables)! Great posts, Kendra! Following the same theme, we found this issue while looking at queries issued from JDBC. Specifically, the prepared statement class seems to cause queries to hit the density vector…
Read More

Why You’re Tuning Stored Procedures Wrong (the Problem with Local Variables)

There’s an important rule for tuning stored procedures that’s easy to forget: when you’re testing queries from procedures in SQL Server Management Studio, execute it as a stored procedure, a temporary stored procedure, or using literal values. Don’t re-write the statemet you’re tuning as an individual TSQL statement using local variables! Where it goes wrong…
Read More