Few days back i blogged that my manager said to me to optimize an sp , so here is the story for this:
The sp was not running for one day data even in 45 mins, but now its running in 4 mins for one month data. So here are the tips of what i did.
1. Added "with recompile" in sp.
2. Added "SET NOCOUNT ON; "
3. Applied Parameter sniffing
4. Created two Non clustered indexes on one of the table.
No comments:
Post a Comment