Pages

Tuesday, 4 November 2014

New Podcast on Technology and SQL Server - Sounds of SQL

I've been planning on doing a technology / SQL Server podcast for a while.

There are some really goods ones on tech I listen to like;  .NET Rocks , RunAs Radio , SQL DownUnder
and of course Scott Hanselman's podcasts HanselMinutes , This Developers Life , Azure Friday and of course the 'fancy' Ratchet and the Geek (which is my favourite right now )

These are great and I love then, but I’ve not found anything from a British point of view… 

I asked a friend to put one together with me and I went up to SQLRelay in London and did a series of 5 minute interviews with a number of speakers..

The interviews will be going up on Sounds of SQL over the next few weeks once I get the hang of the editing process, I will be putting them up on iTunes too.  [One has already gone up]

Tuesday, 14 October 2014

Windows Technical Preview...

I just can't resist a new version of windows, no matter how how early.

Firstly get with the program, http://windows.microsoft.com/en-gb/windows/preview

Download the ISO, create a new virtual machine and bish bash bosh  - minutes later, Windows X
(using a VMWare Fusion on my macbook pro)
When you log into windows, you go straight to the desktop and well, well, well the start menu is back - and its looking good...
It feels like Windows 7.5 (!) ;-)





Task View - or multiple desktops is cool, but I do remember a Tweak UI on Windows 95/98 , this has been a feature of XWindows for years!










File History - interesting - is this the start of TimeMachine for windows? (Perhaps not) - I will play when I attach a USB drive.


Search has been updated, but its not clear how different or new this is.









Well thats it for now, it looks good, its quick, I might just switch over as my main OS. ;-)

Wednesday, 30 July 2014

SSMS Add-in feature request

We all use SSMS, we all love SSMS, it's really good. 

I know we use it everyday and it hardly ever breaks, but Microsoft don't add new features very often.
This can be somewhat frustrating, you can buy 3rd party Add-ins, to extend the functionality, but technically these are unsupported by Microsoft. 

A while ago, I wrote a couple of SSMS Add-ins for a few missing features that really bugged me, namely; code formatting, scripting data and schema (I know you can do it, but not from a right click on a table) and a versioning Add-in (this tracked each schema change and showed it in SSMS).

I stopped working on these a while ago, but after SQLBits, I've decided to dust off the code I uploaded into CodePlex and pick up where I left off.

So I put a request for new features on twitter, I got the following requests;
1) Cats (I assume the musical)
2) Calendar with community events in it
3) Porn
4) To produce server build documentation
5) A quick way of seeing all the extended properties on a table and all its columns. And editing them!
6) Some way of indicating the IDENTITY column if there is one?
7) Something that shows the partitioning wouldn't go amiss either and the age of the stats
8) Size of the table in Kb/Mb? Same with the indexes?
9) Is it possible to see number of table reads/scans for a particular table?
10) A feature that says "Please remove this software from your computer as you clearly have not idea what you are doing!"? I would prefer something that gives electric shocks as well but I think that Amnesty International and the unions may have object to that!!

Feel free to add more features requests to the blog comments.

Sunday, 27 July 2014

Recharging my SQL Batteries

I went to SQLBits ( the biggest SQL Server Conference in Europe) last week and came back with two things, 1) a sore knee and 2) my SQL Batteries being recharged. (Its just under 10 weeks since I broke my leg)

Last year I chaired SQL Relay, we (the SQL Relay committee) put on 10 events up and down the country.  If you think it sounds like a lot of work, it was!! But we pulled it off together.  I am massively proud of everyone involved, I can’t remember the numbers, but we had over 1000 attendees - without the helpers, sponsors and attendees we would not have pulled it off.

But its was really draining…

So now, I'm feeling recharged, refreshed and ready to go...  I've got a number of things planned, so watch this space..  




Friday, 23 May 2014

Broken Leg...

Firstly,  let me answer a few questions..

Yes - it hurt (a lot).
Yes - it still hurts.
Yes- the pain killers do help.
3 months.
Judo - I was fighting and landed on my knee.  
Yes - I may go back to Judo.
Yes - Lots of clips/staples.
I've got a metal plate and some screws.
No - they won't come out, they stay in.
Yes - its a cool scar and yes, you can have a look.

I think that just about covers everything? :-)

Now for the pictures...









Thursday, 11 July 2013

Question: When is a columnstore index not a columnstore index?

Answer:

When its a rowstore index.

or

When its not been rebuilt.

 

Explanation:

The answer is on MSDN – “The updateable columnstore first inserts new data into an OPEN rowgroup, which is in rowstore format” –> Yes, rowstore, not column store.

MSDN says re-organising the index will put it in columnstore format, but in CTP1 this doesn’t work. You need to rebuild the index, not a problem because we are using developer edition (or enterprise edition).

I’ve blogged here what happens when you insert into a column store index here

Tuesday, 9 July 2013

Column Store Index Life Cycle

In my series on the Column Store Index, I thought I would blog on what happens when you insert/ delete into a column store index.

1) Lets insert some rows into a table with a column store index.

image

2) Rebuild the Index. The state of index changes to Compressed from Open and size_in_bytes is populated.

image

3) Insert some more rows. We now have two rows, one ‘OPEN’ and second ‘COMPRESSED’

image

4) Delete some rows. The deleted rows appear to have come from the ‘COMPRESSED’ row.

image

5) Rebuild the index again.

image

 

6) When I updated 1 row in the COMPRESSED table, the engine deleted the row and added a new row in the OPEN / delta table.

 

image

The page on MSDN about the sys.column_store_row_groups system table  http://msdn.microsoft.com/en-us/library/dn223749(v=sql.120).aspx , explains why the 2nd table / delta table or delta row set is used , how and when data is moved from open of the threee states; ‘OPEN’,’COMPRESSED' and ‘CLOSED’ – I’ve not seen ‘CLOSED’ yet.

Clustered Column store index recap

Last week I blogged on the Clustered Column store index, I’ve been playing with it – its very early days, as its a feature of SQL2014 CTP1.

Just to recap.  I noticed that something wasn’t working as I expected.

image

The number of rows returned from the report ‘Disk usage by table’ is incorrect, shown by the top results set, the correct number is shown from select count (*) query and the select from sys.partitions.

Also notice on sys.partitions, the compression description.

image

So how do I get the standard report to show the right data?

Well, restarting the instance doesn’t help.

But what about rebuilding / re-organising the index? Re-organising the index does nothing, but rebuilding the index works!

image

All the counts are returning the expected number of rows, now everything is alright with the world.

Wednesday, 26 June 2013

Very interesting things about updateable column store indexes

After more digging, I’ve found a link on msdn to information about the new system table sys.column_store_row_groups. http://msdn.microsoft.com/en-us/library/dn223749(v=sql.120).aspx

This bit “The hobt_id for delta row groups, or NULL if the row group type is not delta. A delta row group is a read/write row group that is accepting new records. A delta row group has the OPEN status. A delta row group is still in rowstore format and has not been compressed to columnstore format.”

So this sounds like there are still two tables [or row groups], the delta row group which you can read and write into and a 2nd row group which is compressed.

This is the work-around people have been using with the non-updateable column store indexes to make to work like they are updateable, but its happening behind the scenes. 

 

Very very nice.

More interesting things about the Clustered Column store index..

I’ve previously blogged on some interesting things about the clustered column store index or CCSI for short.

I’ve found my CCSI in an internal table.  sys.Column_store_row_groups

image

Noticed the size_in_byte…NULL

Just for fun, I tried to create a 2nd column store index on the same table. (Non-clustered of course)

image

So we can’t add a non-clustered column store index (NCCSI) to a table that already has a CCSI.

But can we add two NCCSI to a table? The answer is no, but the UI doesn’t let you get that far.  Its non-selectable.. interesting..

image

And more digging….

Interesting thing about updateable Clustered Column Store Index

I downloaded SQL Server 2014 CPT1 last night and I’ve started playing with it.

I’m really interested in the updateable clustered column store index, so I thought I would see if it works in the CTP1 (not all features are released in the CTPs)

I created two identical tables, added a Clustered Column store index to one of them, and inserted 15000 rows into both of them.

Guess what, it only bloody worked! Excellent! Happy bunny.

So the next step, how does it work? While looking at the IO for the insert, I stumbled on this..

image

TestTB_1 has 15,000 rows and TestTB_2 has 0 rows… Wait a second, that’s not right.

image

No – There are 15,000 records in both tables.

image 

Wow – check out the logical reads,physical reads…etc…etc..

All coming back as 0 – I guess the column store engine isnt reporting back in the same way the normal engine is.

This will get fixed at some point, no doubt, but the fact that the column store index was updated is so cool…

I’m going to do some more digging now…

Monday, 10 June 2013

Going to SQL Relay?

Going to SQL Relay? Show some support and impress your friends and colleagues with these two badges.  Not going to SQL Relay? Why not! Go to the SQL Relay web site and find out where your nearest event is.

“I’m speaking at SQL Relay”

<a href="http://www.SQLRelay.co.uk"><img src="http://www.SQLRelay.co.uk/images/SQLRelaySpeaking.png"></a>

“I’m going to SQL Relay”

<a href="http://www.SQLRelay.co.uk"><img src="http://www.SQLRelay.co.uk/images/SQLRelayGoing.png"></a>