Free SQL Server Statistics book: For instance, for those who need more help on that topic see a blog post I did pointing out "Understanding SQL Server Statistics": A great, free, relatively brief ebook.I have added that as a comment on the post and hope that Pinal will correct it there, bit if not I wanted to offer this here. To fix it, change this lineĭECLARE NVARCHAR( 4000) = 'use (putting brackets around the "?"). Note a point about that code: if your database names have special characters (even a simple "."), the offered SQL will fail.(And a couple other resources here can help you further if that's an issue.)
Well, Stuart wrote some nifty code to check how out-dated your SQL Server stats may be, across all tables and all databases in your server. I mentioned briefly above how outdated SQL Server statistics can hurt, as they're used by the query analyzer to create execution plans.
While he has hundreds of posts each year that are valuable, one in particular that I find myself pointing people to is one done actually by a guest blogger, Stuart Ainsworth (who I've known from our days in the Atlanta SQL Server user group, ).
Or it may be that they have not done any tuning at all and the default settings for their database server are not be well suited to them.Īnd though such problems are common to any database server (MySQL, Oracle, PostgreSQL, and so on), I find that an awful lot of my clients (for whatever reason) do run on Windows and do use SQL Server (and that doesn't make them stupid or lazy. For instance, it may be that they have not been keeping their indexes or statistics updated, or it may be that they need indexes that they don't have, or have too many that they don't really need. More often it's about configuration issues. Often in my role as an independent consultant providing ColdFusion server troubleshooting services, I find myself helping folks determine whether or that a problem is in their database.Īnd though it may surprise many, I generally do not find the problem to be very often with the SQL they are running. And I may revise the content as necessary. Corrections are welcome, in the comments.
Same with links and subsequent comments from myself or others. Some content may be outdated-though not necessarily.