|
|
Browse by Tags
All Tags » T-SQL (RSS)
-
The behavior of column matching in subqueries is a little peculiar, to say the least. If you've been bitten by this behavior once, you're unlikely to have been bitten a second time, but for some of us it just takes a while to sink in. This morning I wasted...( Read More...
|
-
I've been fairly distracted this past week with my " Bad habits to kick " series, so apologies for being so late with the Connect digest. I stumbled upon a few pretty interesting items from the past two weeks; I hope you find them interesting as well....( Read More...
|
-
A few weeks ago, I wrote a post about forming a new habit: always terminate statements with semi-colons . Today I thought I would share some wisdom about kicking a habit that most of us have: using ordinal numbers in our ORDER BY clauses. For example,...( Read More...
|
-
Again I am a day early, as tomorrow I will be speaking at the CTDOTNET CodeCamp in Hartford. As a reminder, I am not begging for votes here, just raising visibility for new issues you may not have seen yet, or older issues that have entered my peripheral Read More...
|
-
Here are some issues I came across recently; most involve SSMS in some way, though Erland's assertion suggestion is a great one. At the bottom I also compare the current vote counts + rating for the items I submitted last week. ==================== ASSERTIONS Read More...
|
-
Here are the items from this week that I feel deserve some attention. I'm also adding a little bit of analysis to this. I am always curious if my vote-pimping has any effect, so I am going to start taking a note of the ratings at the time I publish the Read More...
|
-
When developing stored procedures, there seems to be a lot of emphasis on "get it done fast." Which means type all lower case, pay little attention to formatting, and sometimes throw best practices out the window. Personally, I would rather front-load Read More...
|
-
In the SSWUG Virtual conference, Earl asks, Paul, I am looking @ several million records. In each record is a nvarchar that IDs the record and a datetime for when the transaction took place for that nvarchar ID. I need to capture the nvarchar ID when Read More...
|
-
In 2005, rebuilding a table that was a heap (no clustered index) wasn't easy. You could copy it to a different table, or you could add a clustered index and then drop it. In 2008, this is a far easier thing to do. They have added to the ALTER TABLE command Read More...
|
-
Tonight, as I was creating my sample database for my chapter on implementing the database, I learned something new, that existed in 2005. I had always used sp_changedbowner to change the owner of a database, but I was reading in another section about Read More...
|
-
This dynamic management object returns the SQL that was saved when a query was executed. This is a very exciting and useful thing to have, as there are dynamic management views that you will be able to use to get statistics for a query, as well as the Read More...
|
-
This object provides very useful stats on how many times an index has been used, locked, waited on, etc. An index in this context can mean several things: a clustered index, heap, index, or a partition of either of these. The grain of the function is Read More...
|
-
This object gives statistics on how an index has been used to resolve queries. Most importantly it tells you the number of times a query was used to find a single row ( user_seeks ), a range of values, or to resolve a non-unique query ( user_scans ), Read More...
|
-
Give space usage of objects in tempdb (most likely this will be extended to more than just tempdb in a future edition of SQL Server.) Can be used to see how and why space is being used in Tempdb, on a file by file basis. Type: View Data: temporal, reflects Read More...
|
-
For the current database, gives you space oriented statistics for each partition of indexes (even if you only have one partion), like row count, page counts, etc. Resembles the sysindexes in previous versions of SQL Server, with more information. Type: Read More...
|
|
|
|