Archive

Posts Tagged ‘SQL’

Running Many Batch Statements in Parallel

January 8, 2012 6 comments

imageWhen designing highly scalable architectures for modern machines, you will often need to do some form of manual parallelism control. Managing this is not always easy, but in this blog I will give you one piece of my toolbox to help you.

Let us walk through an example together, a tiny case study. This is a problem which many of you will be familiar with.

Read more…

Implementing MurmurHash and CRC for SQLCLR

December 7, 2011 2 comments

As we saw in my previous post, the build in hash functions of SQL Server were either expensive with good distribution, or cheap, but with poor distribution. As a breath of fresh air, let us look at a useful magic quadrant:

 

image

Read more…

The Ascending Column Problem in Fact Tables –Part two: Stat Job!

July 7, 2011 3 comments

In my last post I described a common problem with statistics in data warehouses. I also directed you to a trace flag that partially solves the problem. There is an issue with this trace flag: at the time of writing this blog, it does not work on a partitioned tables. Considering that large tables tend to be partitioned, this could be an issue.

Read more…

Latch and Spinlock Papers Published on Microsoft

July 1, 2011 Leave a comment

I am happy to announce that my team mates, Ewan Fairweather and Mike Ruthruff have published two excellent whitepapers on latch and spinlock diagnosis. You can find them here:

Pay special attention to the spinlock scripts, you will find an interesting trace flag in there that sheds more light on my intentionally vague dodging of the call stack subject in my blog entry here. I am sorry that I did not provide more details in the blog, but I did not want to give the plot away Smile

I am very proud to have Ewan take over the OLTP tuning on the SQLCAT  team here in EMEA. Buy this guy a drink next time you meet him at a conference and have a chat with him about scalability.

Small differences between SQL Server and PostgreSQL

May 19, 2011 14 comments

In my copious amount of spare time Smile, I am currently working with Gapminder to build a data warehouse. We are using PostgreSQL and Ruby Rails as the development platform.

As I learn PostgreSQL, I am running into some interesting differences. For the SQL Server/PostgreSQL people out there, I thought it might be interesting to describe some of them in case you are transitioning from one to the other.

Read more…

Grade of the Steel: Introduction

May 1, 2011 Leave a comment

There are a lot of things I want to say on this blog, so I do apologize in advance for jumping a bit between subjects. I will shortly write the next installment of my data modeling series – but before that, I want to let you know about some exciting new tests that I am working on in my copious amount of spare time Smile.

Read more…

Utility functions: fn_convert_to_base and fn_nums

April 26, 2011 3 comments

I will often use code to illustrate my points in this blog. Because data generation is a big part of these examples, I will take the chance to introduce a few functions that I find useful for that. I will use these functions in my examples, so refer to the Utilities category on this blog to find the source. Most of these functions are adaption from other users of SQL Server and I will do my utmost to give credit where credit is due. If you feel you are the owner of the original idea – please send me an email so I can give you proper credit.

Read more…

Doing FIRST and LAST aggregates in SQL Server 2005

July 10, 2006 Leave a comment

Users of Microsoft Access may be familiar with the aggregation functions FIRST and LAST. Basically, what you want from these aggregates is to scan the tables in a sorted order. The first or last value encountered in each group is send to the output – much like the existing SQL Server MIN/MAX function.

Read more…