Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Today I come across something interresting in SQL Server.
I was optimizing a report query and in the SSMS windows runned in 10 seconds for 3000 rows.
Put it to a stored procedure took me 5 minutes for getting 100 rows.
I was like WTF?
After some research I found out that the problem was that I was using the Stored Procedure parameters in the query.
Created local variables for the parameters and poof... 10 seconds again.
So if you are creating Stored Procedures in SQL Server DO NOT USE THE PARAMETERS FROM THE PROCEDURE. CREATE LOCAL VARIABLES.
undefined
all must know
experience
sql server