Event store growing ...

We had the opportunity of trying out some new tech a while back when building a licence system and going through the options for persisting data we ended up choosing Event Store (not just for the cute mascot). It’s not really intuitive to get up and running but works well once there....

SQL query 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. PgSQL SELECT SUBSTRING(qt.text, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.text) ELSE qs.statement_end_offset...

Rounding or grouping...

When retrieving data for statistical usage in SQL it´s oftenly useful to group the data to some kind of time interval. Easiest and most used is probably simple grouping by date: PgSQL SELECT cast(Timestamp as date), COUNT(*) FROM MyTable GROUP BY cast(Timestamp as date) 1 SELECT...

Want to group by dat...

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 unnessesarily complicated by converting the dates to varchars in formats I didn’t even want and maybe even use...

SQL Bottlenecks

In our environment we´ve got a heavily loaded SQL Server as a trunk in the system. Most systems look like this and sooner or later you will probably want to troubleshoot bottlenecks in this database. From a nice fellow at Microsoft we got handed the scripts from Jimmy May´s blog that gives us...

Saving binary fields...

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 formats that it can open...