Comments for SQLGrease SQL Server Performance tips https://blog.sqlgrease.com/ Performance tuning tips from the SQLGrease team Fri, 24 Oct 2025 18:10:53 +0000 hourly 1 https://wordpress.org/?v=6.9 Comment on What’s filling up tempdb? by franklinyamamoto https://blog.sqlgrease.com/whats-filling-up-tempdb/#comment-58301 Fri, 24 Oct 2025 18:10:53 +0000 https://blog.sqlgrease.com/?p=1041#comment-58301 In reply to larrybud.

You can try removing the CONVERT(XML bit. I’ve run into this before. SQL will only tolerate so much nesting in an XML document before it barfs.

]]>
Comment on How to measure query runtime when developing/testing – part 3 by franklinyamamoto https://blog.sqlgrease.com/how-to-measure-query-runtime-when-developing-testing-part-3/#comment-58300 Thu, 02 Oct 2025 16:36:08 +0000 https://blog.sqlgrease.com/?p=1537#comment-58300 In reply to Charlie Arehart.

I’ll add links to the other two posts. Feedback is appreciated. Thank you.

]]>
Comment on How to measure query runtime when developing/testing – part 3 by Charlie Arehart https://blog.sqlgrease.com/how-to-measure-query-runtime-when-developing-testing-part-3/#comment-58299 Wed, 01 Oct 2025 16:19:16 +0000 https://blog.sqlgrease.com/?p=1537#comment-58299 Thanks for the series and the many various posts. On this topic, readers wanting to find parts 1 and 2 may eventually find they are not readily available on your right nav bar. Would you consider adding a link (in the text or as a comment) to the two previous parts? I fear if I did that here, the comment might get blocked.

Also, I don’t find that you have a search feature for the blog. Am I missing it, if it’s there? I do realize smart people can use keywords in search engines to focus solely on a given site (site:blog.sqlgrease.com somesearchterm), but not everyone will know that (or see the tip I just offered). Would you consider adding a search capability, whether one of your own making (on your server) or one that just leverages such a search engine’s capability?

Just trying to help, not complaining. 🙂

]]>
Comment on How to measure query runtime when developing/testing – part 2 by franklinyamamoto https://blog.sqlgrease.com/how-to-measure-query-runtime-when-developing-testing-part-2/#comment-58287 Thu, 11 Apr 2024 15:59:57 +0000 https://blog.sqlgrease.com/?p=1535#comment-58287 In reply to sqldeveloper.

When looking in properties these times are in milliseconds. I’ve been meaning to update this post to show that times within the operators of the execution plan are displayed as well (these are displayed in seconds though).

]]>
Comment on How to measure query runtime when developing/testing – part 2 by sqldeveloper https://blog.sqlgrease.com/how-to-measure-query-runtime-when-developing-testing-part-2/#comment-58281 Fri, 05 Apr 2024 20:32:00 +0000 https://blog.sqlgrease.com/?p=1535#comment-58281 Nice post. How would capture elapsed times in the microsecond or nanosecond range? Thank You

]]>
Comment on Performance implications of using DATEDIFF function in WHERE by Lance L https://blog.sqlgrease.com/performance-implications-of-using-datediff-function-in-where/#comment-56676 Fri, 08 Apr 2022 21:20:51 +0000 https://blog.sqlgrease.com/?p=1233#comment-56676 This is an awesome post. I had never taken into account the sargability of the DATEDIFF function when used in the predicate . My initial assumption when looking at a problematic query is to validate that whatever column is used in the where clause , that it’s indexed or not.

Such a straight forward solution for potential and existing problematic SQL. I am going to use this for some procs that I know use the DD function in the WHERE predicate.

]]>
Comment on How to fix RESOURCE_SEMAPHORE waits by franklinyamamoto https://blog.sqlgrease.com/how-to-fix-resource_semaphore-waits/#comment-56148 Tue, 15 Mar 2022 01:58:49 +0000 https://blog.sqlgrease.com/?p=626#comment-56148 In reply to Prithi.

Hard to say for certain, but it could be an interesting experiment to test a query that requires a memory grant and see what the difference is when a table is highly fragmented vs not fragmented at all. You can do a rebuild to get rid of the fragmentation and test that. Another option is to play with fill factor (set it extremely low) to generate a fragmentation type scenario artificially. Generally where I see excessive memory grant issues it’s related to using the wrong data types, or doing converts to a datatype such as CONVERT(VARCHAR(MAX)…

]]>
Comment on How to change your default transaction isolation level in SSMS by franklinyamamoto https://blog.sqlgrease.com/how-to-change-your-default-isolation-level-in-ssms/#comment-56147 Tue, 15 Mar 2022 01:49:48 +0000 https://blog.sqlgrease.com/?p=1010#comment-56147 In reply to John Bevilaqua.

Hi John,

Generally you should be okay on reporting databases if you’re okay with the results not being 100% accurate. Ideally, snapshot isolation is the best answer so far as getting a read consistent view that is using optimistic locking.

]]>
Comment on How to fix RESOURCE_SEMAPHORE waits by Prithi https://blog.sqlgrease.com/how-to-fix-resource_semaphore-waits/#comment-55990 Thu, 10 Mar 2022 08:56:56 +0000 https://blog.sqlgrease.com/?p=626#comment-55990 I think fragmentation may cause the query to demand more memory during the time of execution, than initially requested, and it can get into RESOURCE_SEMAPHORE wait.
I am talking just from the theory, and willing to learn from it.

]]>
Comment on How to change your default transaction isolation level in SSMS by John Bevilaqua https://blog.sqlgrease.com/how-to-change-your-default-isolation-level-in-ssms/#comment-55651 Wed, 23 Feb 2022 22:59:32 +0000 https://blog.sqlgrease.com/?p=1010#comment-55651 Where else could this READ UNCOMMITTED setting be used safely? On stored procedures run on Reporting Read-Only Databases? From frozen Tableau tables? From lookups on relatively static tables serving as Foreign Keys? Anywhere else?

]]>