Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hints in Sql Server

Are hints really necessary for every sql statement? We have a dba who is anal about it and asks us to put hints on every select and update statements in our stored procs. Is this really necessary?

like image 720
Satish Avatar asked Dec 06 '25 06:12

Satish


1 Answers

Not usually. Putting them on everything sounds like overkill.

The documentation says

Because the SQL Server query optimizer typically selects the best execution plan for a query, we recommend that join_hint, query_hint, and table_hint be used only as a last resort by experienced developers and database administrators

like image 190
Ed Guiness Avatar answered Dec 07 '25 22:12

Ed Guiness



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!