Last Day to Register for Workshop Tomorrow
– Learn More or Register: Virtual Workshop: SQL Server Performance (Mar 12!)– key concepts, learning and how-to information for working with SQL Server
SelectViews Video Program
Talking to experts – the show today features Kevin Kline, talking about his experiences in field. Also, Adam Jorgensen is on the show today talking about his experiences helping clients with BI projects and more.
[Watch the Show]
Sometimes It Is Just The Simple Things
Every now and then I find myself slapped with the ultra-basics. I get dropped in checking on an issue (often performance) or building out queries related to other queries or… well, whatever. You start with a level 200 or 300 type solution to the issue and then suddenly realize that you should have started more simply.
Today’s thought is to not forget indexes. This is, in my experience, a common thing with those that are more developer than administrators for SQL Server. SO many times I’ve seen applications built, tested and deployed without indexes defined, or with only indexes on primary keys. Of course the application allows searches, has reporting queries and other areas where indexes are clearly needed, but since the development models had limited data, performance was fine… until the database was loaded with real data.
So, my suggestion – review your schemas. More specifically, look at your tables and see what’s there now in terms of indexes, compare it to how your system is used. You can use sp_helpindex <table> to see what’s up. For example:
sp_helpindex tbl_MyTable
This will return a list of the indexes defined, the columns they include and so-on. Compare the columns that are indexed with your application. You’re not only looking for search columns, you’re also looking for indexes that will never be used. Those are candidates for further review and possible removal (extra indexes can add unnecessary work for SQL Server to maintain).
So, there’s your tip of the day. Start basic. MORE basic than it seems you may need to. Make sure, if you’re chasing a performance issue, that you at least have the supporting indexes in place. If so, then you can start looking at other things that may be impacting that speed.
Featured Script
Split a string based on delimiter character
Function to take a delimited string, parse the results with a passed delimiter and return a table with one column of type var… (read more)