Archive For The “Sql Server” Category

Geography, SQL Server and Big Updates!

Ran into a situation today where I had the following problem. A database was given to me that had places (with Geography types in it) but I needed to be able to search based on a “Region”. A region, for this case, would be something like United States, Poland, Canada, etc. I also had a […]

Read more »

SQL Fragmented Index Query

I put together this query on SQL Server 2008 to help me organize the fragmented indexes and thus get me pointed in the right direction for troubleshooting. SELECT dbps.database_id, dbps.OBJECT_ID, dbps.index_id, sysi.name, dbps.avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS dbps INNER JOIN sys.indexes AS sysi ON dbps.OBJECT_ID = sysi.OBJECT_ID AND dbps.index_id = sysi.index_id […]

Read more »

Using the SQL Server Performance Dashboard Missing Indexes Report

Using the SQL Server Performance Dashboard Missing Indexes Report – Driving The Database Engine – Site Home – MSDN Blogs. I NEEDED this article today. We are on the hunt for missing indices and we don’t always have access to sql management studio or other tools that should be part of our workbench. The query […]

Read more »