A while back, I wrote a simple little query that lets you Get Index Included Column Info (because sp_help and sp_helpindex only show non-included index columns). More recently, I’ve been wanting not only a better way to look at index information, but a way to compare indexes…for example, to find duplicate or covered indexes. Here, friends and […]
Category: TSQL
A Quick Guide to Expanding Database Files and IFI
This is a topic that’s been well covered, but in the interest of spreading good database practices, here’s a very quick note on instant file initialization (IFI) and database files. (As always, you should read the fine print – meaning Microsoft’s documentation – before you do anything on a production system.) Instant File Initialization IFI […]
SELECT GetDate() – 30 AS [This actually works??];
I just ran across this in a piece of code (that I didn’t write): … WHERE Thing >GETDATE()– 30 Aaaand it works. If you run the title of this blog post, you’ll get the date 30 days ago. I had no idea you could do this…I’m very much used to using DateAdd() for all my […]