Why I Hate GUIDs

Using a GUID as a primary key and or clustering key in SQL Server database tables is a subject for religious debate. Sure, they are unique, but they are also wide which makes your nonclustered indexes bigger as well. Some developers swear by them and will use nothing else.

I have a customer using the uniqueidentifier data type (the GUID of SQL Server) along with NEWSEQUENTIALID to populate them. Most columns of the tables are foreign keys, also uniqueidentifiers, so the database is almost completely GUIDs.

I was really excited to hear that many previously Enterprise only features would be available in Standard Edition starting with SQL Server 2016 SP1. I’m talking about features that I would really love to implement for this customer such as database compression, partitioning, and columnstore indexes. But, guess what, the uniqueidentifiers just won’t work with these features. Ugh. Changing from uniqueidentifiers to integers would be incredibly painful.

So, that is why I hate this data type. The only thing I like is that there are four pronunciations for GUID: gwid, goo-id, G U I D, and my favorite, gooey D.

Posted in Uncategorized | Leave a comment

What is a Microsoft MVP?

I was recently interviewed by Carlos Chacon (@CarlosLChacon) and Steve Stedman (@SQLEmt) for their SQL Data Partners podcast. I had chatted with Carlos at PASS Summit a couple of years back, and we finally got around to doing an interview about being an MVP.

NOTE: One aspect of the MVP program changed between when the podcast was recorded and when it was published. MVPs are no longer awarded on a quarterly basis. It is now monthly.

So, first question: Just what the heck is a Microsoft MVP anyway? MVP stands for Most Valuable Professional. This is an award that Microsoft gives to people in the community who share their knowledge about Microsoft technologies. Microsoft employees are not eligible. While it is an award, it’s also a status. The award is given for one year, so you can call yourself an MVP as long as you have been awarded within the past year.

How might you be eligible? You must have a substantial impact on the technical community. That could be by blogging, answering questions, writing books, teaching public classes, presenting, creating an open source tool, and more. You don’t have to do everything, but the things you do should impact lots of people. Hopefully, they will be things that you love to do. I enjoy presenting and writing, so those are what I do the most.

To be considered, someone, usually another MVP, must nominate you. Your contributions over the past year will be reviewed. How someone is chosen is not really public knowledge, but you must be doing a lot of community work.

I truly believe that being an MVP is a bonus for doing the things that you love to do and would do even without the MVP award.

Do you have to be an expert in everything? No, there are several technical areas for MVP status. I am a Data Platform MVP. Previously, this was called SQL Server, but because of the many data related technologies on Azure that don’t use SQL Server, the name was changed in 2015. Actually, Microsoft revamped all the categories at that time.

What are the benefits of being an MVP? Mostly, it is an honor to be chosen. There are some great benefits, too, such as an MSDN license and the MVP Summit. Being able to list the award on your resume and greater exposure if you are a consultant are some of the non-tangible benefits.

Be sure to listen to the podcast. I was even able to bring up Star Trek!







Posted in Life in IT | Leave a comment

Data Types in SSRS Mobile Reports Category Charts

There are several chart types found in traditional paginated SSRS reports. The charts have many properties, but these are configured the same from chart type to chart type. SSRS Mobile report charts are very different. Each chart has a specific purpose and unique properties.

The Category Chart displays a value over a series. For example, you may want to display total sales by territory. The category, or series, is required to be one of the character data types (char, nvarchar, etc.).

To demonstrate, I created a new shared dataset called SalesCountByYear. Here is the query using the AdventureWorks2014 database:

SELECT COUNT(*) AS SalesCount, YEAR(OrderDate) AS OrderYear 
FROM Sales.SalesOrderHeader 

After launching Mobile Report Publisher, I added a Category Chart.


After switching to the Data page, this is how the simulated data looks:


Notice that the series field can be only Category or FilterKey. These both contain character data. Next, I added the SalesCountByYear dataset to the Mobile Report.


Notice that OrderYear displays decimal points. I switched the dataset in the Series field name property, and found that neither of the columns in the dataset can be used.


Numeric columns cannot be set as a Series name field. To work around this, I modified the dataset, casting OrderYear as a CHAR(4).


You can refresh the dataset in the Mobile Report, but I found better results by deleting it and adding it back. Once that was done, the OrderYear values looked better without the decimal places, and OrderYear was available to use as the Series name field.


This is how the chart looked after making the data type conversion:




The Comparison Category chart works similarly to the Comparison Chart. The Comparison Category Chart allows you to compare two values over the series. You will see the same data type requirements for the Series name field property.

Would you like to learn more about SSRS 2016 Mobile Reports? Check out my Pluralsight course!


Posted in SSRS | 1 Comment