October 4, 2018 at 6:28 am
Lowell - Monday, September 24, 2018 7:53 AMdon't forget the basics: make sure you've added SET NOCOUNT ON at the top of your procedure, as well as commenting out any PRINT statements.
those add some added overhead as they send messages back to the application, which are most likely ignored anyway.from there i would start checking to make sure that all queries are SARG-able(meaning the SearchArgument can use an index...
no LIKE statements,
no functions on column names,
no OR statements,
no implicit conversions on data types.
Thank you.
October 4, 2018 at 7:26 am
Lowell - Monday, September 24, 2018 7:53 AMdon't forget the basics: make sure you've added SET NOCOUNT ON at the top of your procedure, as well as commenting out any PRINT statements.
those add some added overhead as they send messages back to the application, which are most likely ignored anyway.from there i would start checking to make sure that all queries are SARG-able(meaning the SearchArgument can use an index...
no LIKE statements,
no functions on column names,
no OR statements,
no implicit conversions on data types.
Careful now. Non-leading-wildcard LIKEs are incredibly useful in certain cases and don't hurt SARGability. They may cause some extra range scanning but that's normally trivial compared to what happens with non-SARGable queries. The other things you mention are absolutely spot on.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 4, 2018 at 11:57 pm
Jeff Moden - Thursday, October 4, 2018 7:26 AMLowell - Monday, September 24, 2018 7:53 AMdon't forget the basics: make sure you've added SET NOCOUNT ON at the top of your procedure, as well as commenting out any PRINT statements.
those add some added overhead as they send messages back to the application, which are most likely ignored anyway.from there i would start checking to make sure that all queries are SARG-able(meaning the SearchArgument can use an index...
no LIKE statements,
no functions on column names,
no OR statements,
no implicit conversions on data types.Careful now. Non-leading-wildcard LIKEs are incredibly useful in certain cases and don't hurt SARGability. They may cause some extra range scanning but that's normally trivial compared to what happens with non-SARGable queries. The other things you mention are absolutely spot on.
ok.sure.thank you.
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply