Trace Flag 4136

This week, I have been tuning a Dynamics C5 database. What a horrible mess that is. However, I ran into something that might come in handy in a lot of situations.

I have long known about Trace flag 4136 – but until now, I did not realise this flag is officially documented in a Microsoft source:

Dynamics AX in the Field

This flag is immensely useful and not just for old versions of Dynamics C5. In this blog, I will provide an example of its use and some details about what the flag does.

Continue reading…

Millenium Falcon Light Speed

Need a Quick Performance Fix?

I am currently working on getting VC funding for a very exciting database project. Updates to follow on this blog once I can talk more about it.

However, while we are getting the paperwork in order – I have some extra time to spare. Instead of being bored doing things like vacation, I would rather be tuning databases and make some money on the side.

If you have an interesting database problem that needs solving by me, please get in touch on I offer a competitive price if I can work remotely without traveling or within London zones 1-2. Short term tasks only please.

Update: Has SQL Server already lost Mind Share?

In the comments on my previous post, Erdju made the suggestion that I add StackOverflow to my analysis – suggesting that the more SQL Server questions might be found there, changing the result of the analysis. Using the site to analyse data as suggested by Nick Craver (instead of my own, mocked up version) I can now extract recent data for both sites.

This posts contains the updated result as well as a few additions to the previous post.

Continue reading…

is SQL Server Losing Mindshare?

As many of you have noticed, I have been flirting a lot with open source database lately. I am no longer spending much time going to SQL Server conferences.

About two years ago, I decided that it is time to diversify my knowledge and spend more time with other database products. Back then, this was largely based on a hunch that Open Source is now getting to the point where it is worth looking into. I didn’t really have any data to back up my decision to lower my investment in SQL Server – it was mostly intuition, a feeling for the zeitgeist.

Today, I wanted to assess where things are. It is difficult to get information about the popularity of databases that is not heavily biased, so I decided to mash up some data myself.

Continue reading…

SQL Server Logo

Database Page Row Order

Does Physically ordering rows inside database pages make sense?

A few weeks ago I was asked a great question by Sam, who follows my blog. With Sam’s permission, I am reprinting the question here.

Sam asks (my highlights) :

We are told that we can have only one Clustered Index since we can actually sort the data in only one way. However, a clustered index orders data in the leaf pages in sequential order, but does not order the data within that page itself to be in sequential order. Since the data on the page itself is not sorted sequentially (and thus implying more than one way of possible order), I am confused by the “Since we can sort data only in one way we can’t have more than 1 clustered index” reasoning.

Continue reading…

Prefer Mobile Data over WIFI on Mac OSX

With both 3G and 4G becoming more prevalent, I often find myself getting a better connection over an my mobile data subscription than via a public hot spot.

The problem you often get is that an unstable WIFI hotspot will make your Mac appear unresponsive, even if you have a perfect mobile data connection on a USB or bluetooth connected iPhone.

In this blog, I will describe a simple trick that will configure your Mac OSX to prefer a USB connected iPhone over a WIFI hotspot when both are available.

Continue reading…

Domino pieces about to fall

Adding another transaction log file to Gain Performance

Mike West recently posted a rather active thread on LinkedIn about databases with more than one transaction log file. Eventually, I realised that the full answer to the question: “When does it make sense to add another log file to a database for performance reasons?” is complex enough that it needs a blog available for future reference.

Continue reading…


TPC-H: Schema and Indexes

The TPC-H benchmark is often used a method for customers to evaluate data warehouse products to make purchasing decisions. Because it is such a crucial benchmark, it is important to understand the challenges it presents for database vendors. Unfortunately, the public information about tuning for TPC-H is rather sparse and it is generally hard to come by good documentation. Vendors do not like to be compared with other vendors – so their secrecy is understandable.

In this blog series, I will try to shed some light on the TPC-H benchmark, what I think is wrong with it, and provide some of my thoughts about the challenges you face when tuning it.

Continue reading…