by David | Sep 18, 2013 | Database, Debugging, Performance, Statistics
This is no work of mine but I wanted to highlight it since it´s such a good thing to utilise when optimizing your database and queries. SELECT SUBSTRING(qt.text, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.text) ELSE...
by David | May 30, 2013 | Database, Development, Statistics
When extracting timed statistics from SQL you usually want these stats grouped by some kind of time and more often than not this time unit is days. I used to do this unnecessarily complicated by converting the dates to varchars in formats I didn’t even want and...
by David | Feb 12, 2013 | Database, Debugging
The other day I stumbled upon a tool i´ve been long searching for: Sql Server Managment Studio Boost Its got a lot of features but the one I´d like to highlight is the long wanted “save binary data” -function. Its simple as hell and even got a few presetup...
by David | Dec 7, 2012 | Database, Performance
Stuck without writing rights in a big database? Only allowed to dbo_reader?Then this baby is for you: DECLARE @myTable AS TABLE (rowid int, name varchar) This neat little row can be used instead of temp-tables to store subsets of data to increase the performance of...
by David | Dec 7, 2012 | Database, Performance, Statistics
When using large databases it might be interesting to keep an eye out on what of your tables that actually consumes all that disk. There´s a lot of resources on this out there but I thought I´d repeat it anyways since its such a neat little thing: EXEC...