Click here to Skip to main content
11,482,039 members (63,980 online)
Click here to Skip to main content
Articles » Web Development » ATL Server » General » Alternatives

Tagged as

SQL Server: How Local Variables Can Reduce Query Performance

, 15 Sep 2012 CPOL 8.7K 1
It’s a common practice by database developers to use local variables in stored procedures and scripts to place filter on basis of these local variables. YES, these local variables can slowdown your queries. Let’s prove it. Create a new table and insert dummy rows. USEAdventureWorksGO CREATE TA

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

aasim abdullah
Team Leader CureMD
Pakistan Pakistan
Aasim Abdullah is working as SQL Server DBA with CureMD (www.curemd.com) based in NY, USA. He has been working with SQL Server since 2007 (Version 2005) and has used it in many projects as a developer, administrator, database designer. Aasim's primary interest is SQL Server performance tuning. If he finds the time, he like to sketch faces with graphite pencils.
Follow on   Twitter   Google+

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.150520.1 | Last Updated 15 Sep 2012
Article Copyright 2012 by aasim abdullah
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid