Showing posts with label SQL Rally. Show all posts
Showing posts with label SQL Rally. Show all posts

Monday, May 9, 2011

SQL Rally: Business Intelligence Workshop

Just TWO DAYS until the start of SQL Rally!  I’m going to the Business Intelligence Workshop Pre-Con as my first stop.  I’m as excited as a kid on the 1st day of school!

“Balls”, you say, “Why BI?  Aren’t you a DBA?”

Excellent question Dear Reader.

I’m working on my MCITP: 2008 DBA Certifications and after that I’ll begin work on the DBA developer Certifications.  My goal, for the end of this year, is to have all the pre-qualifications to go for the MCM sometime next year.  So where does BI fit in?

BECOMING MORE INTELLIGENT ABOUT BUSINESS 


Yep I’m a DBA, and it used to be we weren’t so compartmentalized.  It used to be if you were a DBA you were the Developer, the Administrator, and the BI person (and I would bet in some smaller shops that dichotomy probably still exists).  A database, was a database, was a database and that’s all there was to it.  But as the technology has advanced so has the set of skills required to do each job.

I’d like to say I couldn’t Cube my way out of a paper bag.  But this won’t be my first go round with SSAS.  Back in 2008 I had started studying to get my BI certifications for 2005, but life has a way of guiding you and BI was not a place I was supposed to dedicate my focus back then.  I understand the concepts at a 5,000 foot level, but as for applying them I need some work.

So Why BI?  Because our data can tell us a lot of things, and while storing it, maintaining it, and protecting it is important understanding what it can tell us is important as well.  Our data can help us understand trends, patterns, and answers to questions that we might not know existed.  You probably use metrics from your servers to analyze your performance (tracking and trending) .  Well this is doing it with your business data.

KICKING SSAS ONE CUBE AT A TIME


The guys over at Pragmatic Works are the top dogs when it comes to Business Intelligence, and the Pre-Con for SQL Rally get’s you training from not One, not Two, not Three, but FOUR of the top guys in the field today.

Go over to Kendal Van Dyke’s blog  Meet the SQL Rally Pre-Con Presenter’s and read about them, l .  Patrick LeBlanc, Devin Knight, Adam Jorgensen, and Mike Davis are all at the top of this game. 

This is an area where I really want to expand my knowledge and I can’t wait to attend.  I’ll blog about this more in depth on Wednesday night as part of my SQL Rally Day by Day Series. 

I can’t wait get started!  Bring on Wednesday!

Thanks,

Brad


Tuesday, April 26, 2011

SQL Saturday 74 Jacksonville, Last Stop before SQL Rally

This Saturday is SQL Saturday #74 in Jacksonville, FL.  This will be the last time that I present on Data Compression in SQL Server, before SQL Rally in May.

This will be my first time in Jacksonville, but I’ve been told by many experienced SQL Saturday Alumni that the location is beautiful, and the event is always a good one.  We are on the University of North Florida Campus, in the College of Computing and Engineering Building, for the address Click Here


There is a great line up for this SQL Saturday.  You’ve got great Community Leaders & MVP’s like Kevin Boles (twitter), Andy Warren (blog|twitter), Plamen Ratchev (blog|twitter), Kendal Van Dyke (blog|twitter), Don Stevic (blog|twitter), Adam Jorgensen (twitter), Jose Chinchilla (blog|twitter), Troy Gallant (blog|twitter), Brian Knight , and many many more.  I also have it on good authority that this Balls fellow will be there.  For the full event schedule Click Here.

So far over 450 people have pre-registered to Attend, and you can be one of them the cost is A WHOLE LOTTA NOTHIN!  That’s right Dear Reader, the only cost is your time, you showing up and getting free training in SQL from the cast listed above, Click Here to Register.

This is also the last SQL Saturday in the US before SQL Rally, and I’m psyched. 

“But Balls,” you say, ”What if I’m not going to SQL Rally?”

Even more reason to attend!  Some of the presentations given today will be given at the Rally!  Not only that, but your feedback can help make the SQL Rally better.  

Every presentation I do I look for feedback to figure out if there is anything for my presentation that I’m missing or could be doing differently. 

So come out and enjoy a day of free training with your peers, discuss SQL, and if you find a place to leave feedback help influence the presenters to be better at what we do!

Thanks,

Brad





Monday, April 11, 2011

Your Training is Approved! How Do You Get It Again?

With the upcoming SQL Rally there has been a lot of discussion amongst the community of how to help people ask for training. 

One of the first things to go in a tight economy is being sent to Training.  There is a lot of great information out there for free.  There are great blogs, videos, SSUGs (SQL Server User Groups) and not to mention SQL Saturdays.  As a DBA if you are looking to improve yourself there are a lot of great resources available to you.

“So Ball’s do you want me to go to Training or what?”

Glad you asked Dear Reader, yes I do.  The one thing that free training lacks that in-person training provides is social interaction.  Not only does this help you personally but professionally as well.

ONE OF THE MANY REASONS WHY

Two words, simple concept, Social interaction.  There are a lot of things that makes up a DBA’s job, and I’m not just talking Job Description.  What sets apart a really great DBA from others?  It’s not just what they know, don’t get me wrong you have to be knowledgeable in your field.  What sets a great DBA apart is something more fundamental than that, it is their social skills.

Social skills are just like any other that we have, if you do not utilize them then they rust.  If you practice them then they flourish.  When you are at a SQL conference, SQL Saturday, or SQL User Group this is your opportunity to stay sharp.  There is a lot of good information being passed around, ask questions, make points, discuss what you’ve done, and learn something.  This will help you when you get back to your job.

I would ask you to close your eyes and think of a meeting you’ve had at your company.  There is a complex technical issue, perhaps a production environment is down, and the Users/Sales are impacted.  How do people work together?  Do ego’s come out?  Is your opinion listened to and openly discussed?

 I cannot tell you how many MVP, Authors, and in-general SQL Legends that I’ve met that are nice, humble, and willing to listen in a complex technical setting.  If you do not work with a team of DBA’s, or if that team is not a cohesive team, then this is a refreshing experience.  Being in person with people from the SQL community is a treat and can help you use Technical  Social Skills that you can utilize in other areas of your job.

How To Ask

For great blogs on HOW to ask for training check out Kendal Van Dyke (blog|twitter) and Brent Ozar (blog|twitter)

If you need help on how to approach your boss, Kendal wants to help he is very available through his blog, or also on twitter.  Anything short of him having to pay your way, and he’ll be glad to help J.

Brent presents a lot of wonderful ways for you to approach your manager.  He also answers his comments, (as you can see by reading them), so if you have a situation that you don’t feel he covered ask him!  He is also readily available on Twitter.

***************UPDATE 4/11/2011**********************************************

Later in the day while at work I discovered that the Awesome people putting together SQL Rally had a great ROI section that was posted in March.  Not only are there wonderful arguments listed as to why you should go, but there is also a great form letter that can help you ask to big boss to be able to attend.  I had to include the links to this.

ROI For SQL RALLY and HOW to ASK YOUR BOSS

*************AND NOW BACK TO YOUR PREVIOUSLY SCHEDULED BLOG POST******

YAY YOUR APPROVED!

I want to focus on the idea that you have been APPROVED to go.  Your SUPER EXCITED, and you should be!  But through the haze of the excitement you need to consider a few tings.  You don’t want this to be a one shot deal.  You want to go to training again.  So how do you make that happen?  You need a plan.  So ask yourself the following:

1.       What am I going to Learn?
2.       How Will I apply it when I get back?
3.       How do I show my Boss the Training was worth it?

WHAT AM I GOING TO LEARN: SQL WINNING

So your approved to go, now is the time to look at the track’s being offered and determine what your 1st, 2nd, and 3rd choices are for each time slot.  But as you decide I’d like you to think of any issues or new technologies that are being used by your company.  Try to set yourself up to be a returning superstar.

You should think about the projects your working on, or the upcoming one’s you know you’ll be roped into working on. 

If you are working on a project to get your arms around your SQL Environment then look for Sessions on Policy Based Management, Auditing, and Powershell. 

If you are looking at adding High Availability to your environment look for Sessions on Disaster Recovery, Mirroring, Replication, and Clustering.  If Performance is where you need to concentrate look for Sessions on Indexing, Wait Stats, and Compression. 

The point is knowing where you are going and what you NEED to learn to get there will help you achieve some WINNING in the long run.

YOU WENT, YOU SAW, YOU CONQURED, YOU PROBABLY GOT A T-SHIRT

So now it’s Monday and your back at the office.  Your inbox is not Zero, you’ve got meetings, and a to-do list a mile long.  What did we get out of our trip?

While things are fresh it is easy to be excited and ready to go, back at the office reality sets in.  Now is when I like to make a list.  You should do a top 5 things that you learned from training that you want to apply to your job.  If you have co-workers that went to training with you, you can talk to see what their top 5 things are, and align them to work together.

We attended some training a couple months back, and when we returned I had a list of what I thought the top 5 things we could apply were.  The number 1 thing that I wanted to do was pretty low on the list.  After talking with all the other DBA’s it turned out that was the number 1 thing on their list, which they thought could benefit the company right away.

So now that you’ve got your list, and your co-workers are on board, set up a road map of how you will present this to your boss.

Let’s take Policy Based Management for example.
  1. Find a Dev, Test, or local SQL Server Instance on a Laptop that can Server as your Central Management Server.
  2.  Register the instances you would like to run Policy Based Management Against. 
  3. Work with your co-workers, determine policy’s that are most beneficial to your environment. 
  4. Set them up and Run them.
  5. Demo it for your Boss
There are so many features in SQL Server to take advantage of, that it is rare to find a place that has it all figured out.  There is probably something that could benefit your work place that you are not currently using:  Snapshots, Mirroring, Backup Compression, Filtered Indexes, Sparse Columns, Policy Based Management, Data Compression, Central Management Server the list is long. 

If you can find something to apply, and actually get it in place, then future training should be easy to obtain.

What if you didn't find anything new?  What if you were the only DBA to go?  When you come back try to share the wealth.  You just spent some time watching a lot of people present on topics, now is your chance to try with your co-workers.  Work up some of the topics where you learned or gained a clearer understanding of how something works.

  1. Work up a Summary of the Topics and some Demos (grab the decks and scripts if they are available for download)
  2.  Set up a meeting with your co-workers
  3. Present the topics
  4. Get Feedback, go back to the top and start working on your top 5 list with your co-workers on board


SHOW THE TRAINING WAS WORTH IT

Here’s the big payoff.  The next time you try to go to a conference, when your boss hems or haws you say “Hey boss remember problem xyz, and how I fixed that after training.”  Or even better “Here’s how we improved things after training.”

Businesses are all about Return On Investment, ROI, if you can show them that sending you to training is an investment they will get a return on then you’re already on your way to your next round of training.

I hope to see you at SQL Rally this year and next!

Thanks,

Brad

Thursday, March 24, 2011

Thank You PASS DBA Virtual Chapter

Yesterday I was able to do my first webcast, a presentation for the PASS DBA Virtual Chapter.   A Big Thank You to Idera for being the Webcast Sponsor!  Go check them out they are a great SQL Community Member, and a Sponsor of user groups and SQL Saturday Events.  I want to Thank everyone who was able to take time away from work, or during, to attend.  I would also like to thank Sharon & PASS for having me present.  Last but not least I would like to say a big Thank You to Mike Clark for being my Presenter, he made the experience super easy, and was a pleasure to work with!  Mike You rock!

So Dear Reader, the topic at hand was Compression.  I did my presentation that will be part of the up-coming SQL Rally, May 11th - May 13th, in Beautiful Orlando FL.  We have an amazing line-up of SQL Proffesionals throughout the industry that will be on hand.   And for the cost of less than $500 (if you sign up now and that is INCLUDING the Pre-Con)!

DECK & SCRIPTS

My Deck & Scripts were the same that I've used before but I wanted to post them for download, in case anyone would like to use compression.  I want them to have all the tools they need to get started.

Get my Slide Deck Here.

And all the Demo's Here.

QUESTIONS
A Question was asked after the presentation, forgive me if I butcher it, But the main idea was as follows.

 "I've compressed all of the tables in my database, my CPU is below 40%, are there any KNOWN issues with this?  And what do you recommend?"

There is always a case that will be the exception of the rule.  I would not recommend compression your entire database, just like I would not recommend compressing the entire contents of your C Drive.  Sure you'll save some space, but your performance will go down hill because of the overhead.

When you look through the Demo's there is an order that I like to suggest people go through.

1. Look at the Size of your Tables.
2. Look at the Makup of your Tables Allocation Unit's (Only IN_ROW_DATA Compresses)
3. Look at your Scan & Update pattern usage, this will help determine the type of Compression you should use.
4. GET A BASELINE!!! Look at your Table and/or Indexes Size, I/O's, CPU, and Runtime Before.  Then Look at them After.  Do a comparison.   If anything has changed for the negative, then perhaps you shouldn't be using Compression on that Table and/or Index.

It is possible that someone out there has a system that could benefit from every table being compressed, It's not outside of the realm of possibilities.  However, I would wager that would be a very Rare Scenario.

Compression is like Indexes, used properly it is a beautiful thing, but too much can tank your performance.

Thank's Again to everyone who could make the Presentation, I hope you are motivated to go to SQL RALLY!

Thanks,

Brad

Tuesday, January 25, 2011

Vote For SQL Rally! And Why you should vote for Page and Row Compression.



I received an email on behalf of the Organizers of SQL Rally, from Mr. Kendal Van Dyke (Blog|Twitter), and it felt like a call to action.  It asked that we who have submitted a topic blog about it, post on Twitter, Facebook, and Linked-In.  It had some quotes from Andy Warren (Blog | Twitter), here are Andy’s word.

"Vote for me" is a start, but why vote for you? Show me why I need to learn the material and why I should pick you to teach it to me. Do you have experience? Credentials? Passion for the topic? Have you been paying your dues in our community and earned the chance to step up? What we’re trying to do here is put more of the marketing work on the speakers. It’s not enough to just submit an idea, you have to help us get people to want to attend, and that starts with convincing enough people that you’ve got the best content out of the options on your track!

This get’s a big (….check’s that the kids are in bed…) HELL YA from me!  I feel passionate about the topic I’m presenting on, and I would hope so.  I’ve spent quite a bit of time researching it, figuring out how it works, how and when to apply it, and most importantly WHY you would want to. 

So let’s start there why.
Page and Row Compression How, When, and Why

One of the great things about presenting is you get to meet a lot of brilliant people, Bill Ramos (Blog| Twitter) shared with me some insight he had received from the ever brilliant Sunil Agarwal, as to why you should use compression.  It was so good that it is my #1 reason.

1st Let’s talk space.  Sure hard drives aren’t as expensive as they used to be, unless we are talking Solid State Drives, so one question you may have is why do I care about compressing data and saving (*Cheap*) hard drive space.







Production

Well let’s say you have a Database, and let’s say this is your Production Database Server.  Well Ball’s”, you say, I can go out and get a 1 TB hard drive from Office Depot for $100.  Why do I care about compression?” 

We’ll Dear Reader I would say you probably didn’t buy your companies hard drives at Office Depot during black Friday.  You may be using a SAN and the hard drives you put in that SAN may not be the cheapest you could find, probably wanted a bit of Quality, a bit of not super expensive.

I would wager to say that you probably don’t have just one Database Instance at your company.



                        
Production          Staging                 Test                    Dev      
                 
You could have this Database Instance in Multiple Environments.  Don’t forget your offsite Disaster Recovery/COOP (Continuation Of Operations Planning). 

So multiple servers, separate hardware cost, perhaps more than one SAN, the time and effort of SAN Administrators, or outside vendors like EMC, the hard drive space is starting to add up.  And as business look to get a control of or reduce their data footprint Compression can help.

2nd Reduced Memory Footprint, Compression happens at the Record and Page levels.  

The structures that we know and have become familiar with are physically changed.  When compressed pages are read off of the hard drive they are stored into Memory, the buffer pool, in a compressed state.

This is a very important distinction, so I want to repeat it.  Compressed Records and Pages are still stored in a compressed state in memory.  

So why is this important?  

There are 2 ways to read records in SQL Server, one is off of the Hard Disk and is a Physical Read.  When a Page is read off of the disk it is then loaded into the buffer pool before SQL can use it.  This means that we are able to load more records onto Compressed Pages, which translates into being able to load more data into the buffer pool for SQL to read.  This would normally only be possible by adding more RAM to a server and increasing the amount of Memory that SQL Server can utilize.  Loading pages into the buffer pool allows SQL to get the information quicker is called a Logical Read.

Think of it like the human memory.  

I have a conversation with you 1st thing in the morning about compression, we stop to go grab some coffee, and then we have meetings and work to do, 5 hours later I start to have the same conversation and you have to search your mind to pick up where we left off.  That is a Physical Read, and it took a little more effort.

Now let's try again.

I have a conversation with you 1st thing in the morning about compression, we stop to go grab some coffee, and then come back 5 minutes later and keep having the conversation.  The conversation is fresh in your mind, you don't have to search around for it, it is still in your buffer pool.  

By applying compression properly we just expanded SQL Server's Memory without having to change our physical hardware at all.

3rd Trading out CPU Cycles for Physical and Logical Reads.  

In SQL Server you can have hardware bottlenecks of CPU, Memory, IO, and Network.  Most SQL Servers that I have seen in the Public Sector tend to have very little CPU overhead, in the private sector it can be a bit more mixed.  But in either setting it is not uncommon to find SQL Servers that have a low usage of their CPU’s.

Just a moment ago I wrote about how the internal structure of records and pages are changed by compression.  You read about how they are still compressed in memory, so you might wonder how it is that SQL accounts for all these different types of pages and records?  The simple answer is it doesn’t.  When the storage engine passes Data Pages from the buffer pool to the relational engine the pages are translated back to their original format.  The additional effort of reading compressed records, and de-compressing them for the relation engine accounts for some of the CPU overhead that Compression adds to a Server.

This is a balancing act and SQL Server accounts for it by shifting some of the load from our Memory and Physical Disks to our CPU’s, which in the majority of cases can handle it.  

DEMO

So Let’s do a little demo tease to give you an idea of how this can help you.  I’m using the AdventureWorks2008R2 Database for this example.  Here is a quick little script

SET STATISTICS IO ON
SET STATISTICS TIME ON

select
    *
from Sales.SalesOrderHeader soh
left join Sales.SalesOrderDetail sod
on soh.SalesOrderID= sod.SalesOrderID

Now we will execute this script twice and get the second set of statistics, so that way we are only looking at the Logical IO’s required for the query.

We give this a run and we see:


It took 1240 logical reads from table Sales.SalesOrderDetail, 686 Logcial Reads for table Sales.SalesOrderHeader, and a CPU time of 1014 ms to return 121,317 rows of data in 5105 ms.

Now we will apply Page Compression to the Sales.SalesOrderDetail table and look at the reduction of logical reads for that table, as well as any increase in CPU time.

/*
Rebuild our table with
Page Compression
*/
USE [AdventureWorks2008R2]
ALTER TABLE [Sales].[SalesOrderDetail] REBUILD
WITH (DATA_COMPRESSION = PAGE);

/*
Set Statistics On
and re-execute our
query
*/
SET STATISTICS IO ON
SET STATISTICS TIME ON

select
    *
from Sales.SalesOrderHeader soh
left join Sales.SalesOrderDetail sod
on soh.SalesOrderID= sod.SalesOrderID

Now Let’s take a look at our results.



And we see our Logical Reads for table Sales.SalesOrderDetail were reduced to 598 from 1240, A Reduction of almost 52%!  We didn’t change Sales.SalesOrderHeader and the Logical Reads remained at 686, our CPU time went from 1014 to 1716 ms, and our elapse time dropped from 5105 to 5079 ms.

“We’re What You Call Professionals”






Unlike the Myth Busters I do want you to try this at home, and probably at work as well.  I’ve busted my hump to research, learn, and apply this topic, set up demo’s showing how you can find your biggest tables, what the allocation unit make-up of the tables and indexes are (*this is important because only In-Row-Data compresses).  How to use DMV’s to track your Scan and Update usage per object, and how scan’s and updates could affect the type of compression you want to use.

So the order I want you to go in is:


1. Gather Baselines-You need to know what your hardware performance as well as your query performance is before you apply compression!
           
     2. Look at your table’s, which tables have the largest amount of records?


    3. Look at their internal structure, are they mainly comprised of In-Row-Data?


    4. What is their pattern of usage, are they updated frequently, is the majority of the usage scans because they are historical data?


    5. Only once you have found the candidates, and determined the type of compression you want to examine use sp_estimate_data_compression_savings

*Keep in mind the over head!  The way sp_estimate_data_compression_savings works is that it takes a 5% sample of the table you are scanning and moves it to the TempDB, performs the actual compression operation and “estimates” the overall compression savings based on that 5% sample, as well as displaying the sample’s compression rate.

This means that if you try to compress a 100 GB table you need to have 5 GB worth of TempDB data space that can be used by this operation.  If you have a maintenance window, this is the sort of heavy operation you would want to do in off hours, and be sure that your TempDB can handle the space it will need.

SQL Rally, Go VOTE!

There are a lot of great sessions that have been submitted for SQL Rally.  The event is a great deal for some really great training, the Pre-Con’s are top notch professionals that you will be seeing and/or have seen at the PASS Sumit.  There are an absolute plethora of topics that are being presented, and you, the SQL community, get to vote for what you want to see.  Go make it great!  Click Here to VOTE, and Click Here to see the sessions you are voting on, and Click Here for the SQL RALLY Website.

Thanks,
Brad