PayDay loans car insurance

I asked for some names of people who you would like to see interviewed and Craig Freedman's name popped up a couple of times. I contacted Craig and he was kind enough to take time out from his busy schedule to answer these questions.  So, here are the questions.

What are the most important things a person can do to master SQL Server?

Use the product!  I recall once hearing an expert explain that it takes about ten years of practice to master a skill – and this refers to any skill whether it is mastering a software product, a sport, a musical instrument, etc.  Mentors, books, and classes certainly help whether you are just getting started or expanding your existing skill set, but the reality is there is no substitute for hands on experience.

What are the most important things a person can do to master Transact-SQL?

See my answer to the last question!

One thing that is worth pointing out is how different SQL (not the “Transact” part – just the query language itself) is from most other programming languages.  Most languages like C, C++, C#, VB, and JavaScript are procedural.  This is how programmers are taught to think.  First do A, then do B, then do C, etc.  Moreover, because most procedural languages share the same common elements, programming skills are relatively transferable from one language to another.  A good programmer can learn multiple languages fairly quickly.

SQL is much different.  SQL is a declarative language.  You tell the database what you want without specifying how to get it.  It’s a different paradigm and years of experience with procedural languages will do little to help you master SQL.  To become a SQL expert, you need to train yourself to think differently.

What SQL Server books are on your bookshelf?

Surprisingly (or perhaps not surprisingly depending on your point of view), I have only Kalen’s “Inside SQL Server 2005” series.  Much of what I need to know about SQL Server I learn either by checking Books Online, asking other developers (okay, I’m lucky that I have this option!), reviewing the source code (again, lucky me!), and searching the web.

What new technologies introduced in SQL Server 2005 do you think are the most beneficial for performance?

This is an interesting question to ask a developer.  When asked this question, most developers will tend to migrate toward the features or technologies that they work on and understand.  However, like most developers, I rarely use the product (other than for testing purposes) and I’m not a consultant.  So I actually have few strong opinions about what really works or doesn’t work from a customer perspective.  Instead, I prefer to hear from customers what they really like and dislike and what they would like to see in the product.

That said, I do think that the 64-bit and 64-way support that went mainstream with SQL Server 2005 is critical for large enterprise customers who need the most scalable and largest servers.  The DMVs that were added to SQL Server 2005 also have made a huge difference in identifying and addressing a host of performance issues.  Of course there were also a whole lot of smaller features that, depending on your application or workload, could make a huge difference for you but I couldn’t possibly name them all here.

What new technologies in SQL Server 2008 do you think are the most beneficial for performance?
Name three things that are new in SQL Server 2008 that you find are the most valuable?


I’m going to take these two questions together.  As with SQL Server 2008, there are many new features that depending on your application could have a major impact: compression, plan freezing (which should make service packs and upgrades far less painful going forward), the new MERGE statement, star join performance, parallel scans of partitioned tables, and the list goes on.

What is the biggest mistake people make when looking at a query plan?

I’m not sure about the biggest mistake.  What I would do is to encourage everyone to learn as much as possible about how to read query plans, to understand the different types of operators and how they work, and to be careful not to jump to any conclusions before fully understanding a query, schema, and plan.  These skills are essential for evaluating whether a query plan is good or bad or whether a better plan exists.

There are many things that can go wrong with query plans.  For example, a bad plan could be due to cardinality and costing errors, missing indexes, bad join orders, a poor choice of join or aggregation types, too little memory, etc.  At the same time, there are few, if any, absolute rights and wrongs.  Sometimes scans are better while other times seeks are better.  There is no best join type and no join type is inherently bad.

Why did you decide to co-author Inside Microsoft SQL Server 2005: Query Tuning and Optimization?

After I started blogging, Kalen approached me to see whether I was interested in contributing any of my material to her book.  I’d never authored a book before and was really excited about the opportunity to try something new.  So, I jumped at the opportunity.  It was a lot of work but a great experience.  Thanks, Kalen!

Can you name some best practices in terms of creating indexes?

Most importantly, before you start trying to tune your indexes, I think you need to know your workload, establish performance requirements and service level agreements, and understand your query plans.  For example, is your workload mostly read only (in which case the extra indexes may be mostly free aside from the disk space requirements) or a mix of reads and writes (so that the extra indexes need to be maintained)?  Is it more important for your reporting queries to run quickly or for your data loads to complete in the minimum time?  Is this an OLTP system or a data warehouse?

Once you know what you want to accomplish, you can focus on where you can get the biggest gains for the minimum cost.  Generally, it’s best to have a clustered index (rather than a heap).  If you create a heap and one non-clustered index, you have two objects to maintain.  If you create a single clustered index, you have only one object to maintain.  Better yet, clustered indexes tend to perform better than heaps for scans.

Look for large scans with highly selective filters.  Consider whether an index might enable a much more efficient seek.  Look for sorts that might be replaced by an ordered scan.  Look for bookmark lookups over many rows that might be eliminated by adding included columns.  Consider whether creating a different clustered index might eliminate more bookmark lookups.  If you have foreign key constraints, consider whether you need indexes on the foreign keys to support the constraint validation efficiently.  While experimenting, beware that creating new indexes may change plans in unexpected ways.  In SQL Server 2005, the missing indexes DMV and the Database Tuning Advisor (DTA) can help identify possible candidate indexes, but beware as they tend to be rather aggressive with their suggestions.

Finally, try not to overdo it.  Factor the cost of maintaining indexes into your decisions.  Make sure that all of your indexes and all of the keys and included columns are really used.  Get rid of any extraneous indexes.

Since we now have partitioning functions is there still a need for partitioned views?

In almost all cases, partitioned tables are more efficient, easier to manage and use, and overall the best choice.  However, there are still two cases where partitioned views can be useful.  The first case is for distributed partitioned views.  Partitioned tables cannot span multiple SQL Server instances while partitioned views can.  The second case is for tables where the partitions are heavily skewed.  With partitioned tables, the query plan shares the same operator(s) for each partition.  This design results in efficient compilation times and compact plans.  With partitioned views, the optimizer is free to optimize each partition independently and, if the partitions differ in terms of cardinality or cost, to choose different operators for each partition.  This design leads to longer compilation times and larger plans but can yield more efficient plans if the partitions are not uniform.

Are you working on any upcoming books?

No.  After completing my chapters for “Inside SQL Server 2005: Query Tuning and Optimization,” I realized just how much work it is to write a book.  As I said, it was a great experience and I’m grateful for the opportunity, but I’ve decided to prioritize and put my family first!

When should you use a clustered index and when should you use a non clustered index?

As I mentioned earlier, it’s almost always best to have a clustered index rather than a heap.  For the clustered index, try to choose a key that does not get updated.  Updating the clustered index key tends to lead to more fragmentation and to expensive update plans that touch every index.  Since the clustered index covers all columns in the table, you’ll also probably want to look at how you can choose the key to minimize bookmark lookups or sorts.  For example, if you have a set of common queries that all seek on a particular key and then touch a large number of columns and/or rows in the table, it may be best to choose that key for the clustered index.

If you have a query that seeks on a different key, runs less frequently, or only touches a small number of columns and/or rows, that might be a better candidate for a non-clustered index.  Remember that you can include extra columns in a non-clustered index and avoid a bookmark lookup.  But, don’t forget that a bookmark lookup is not necessarily a problem over a small set of rows.

How much does fragmentation affect query performance?

It depends.  For rotating media, random I/Os are much slower than sequential I/Os.  The problem with fragmentation is that it turns what would be sequential I/Os into random I/Os.  Fragmentation won’t affect performance if your workload already includes mostly random I/Os (for example, lots of small index seeks), if most of your data fits in memory so there is little or no I/O at all, or if your data is stored on SSDs where random and sequential I/Os perform comparably.  However, fragmentation could hurt performance if your workload includes many sequential table or index scans.

Unfortunately, the problem doesn’t stop there.  SQL Server reports logical fragmentation.  In most real world scenarios, the details of the physical storage subsystem are abstracted and hidden from SQL Server by all of the layers of hardware and software including the Windows file system and device drivers, SANs, and even drive firmware.  A file that is logically sequential may be stored in a physically fragmented manner while a table that is fragmented may be cached in SAN memory.  In the end, defragmenting an index may or may not be necessary and may or may not help.

What tools are available for developers to use when doing query performance tuning

The only tools I’m familiar with are those that ship with SQL Server: Management Studio, Profiler, DMVs, DTA, and the SQL Server 2005 Performance Dashboard Reports.  You can do quite a lot with these tools.  You can view query plans and try out different alternatives.  You can identify expensive queries and possible index alternatives.


Posted by Denis Gobo, filed under Uncategorized. Date: May 23, 2008, 6:39 pm | No Comments »

Last week Kalen Delaney wrote Did You Know? I have a question for you on DBA Blunders! I though the comments were very interesting, S we did the DBA part but what about developers? What are some of the worst blunders you have seen?
Here are a couple of things


Starting a begin tran, then some insert/update command, never commiting but minimizing the window.


Here is my all time favorite, can you reduce this by 90%?


declare @Token int
select @Token = 51234567


declare @val int


if left(@Token,1) = 1
select @val = 1
else if left(@Token,1) = 2
select @val = 2
else if left(@Token,1) = 3
select @val = 3
else if left(@Token,1) = 4
select @val = 4
else if left(@Token,1) = 5
select @val = 5
else if left(@Token,1) = 6
select @val = 6
else if left(@Token,1) = 7
select @val = 7
else if left(@Token,1) = 8
select @val = 8
else if left(@Token,1) = 9
select @val = 9
else if left(@Token,1) = 0
select @val = 0

select @val


Actually we put that on the whiteboard after we found it in our code and every time the developer wanted something we teased him about it...Oh you mean like that (pointing to the whiteboard)
What about changing the datatype from smallint to int in the table but keeping the params smallint in the proc.....mmmm why do I get a conversion in the execution plan?

So let's here some of what you have seen others write, we all know we couldn't write stuff like that ourselves right? :-)


Posted by Denis Gobo, filed under Uncategorized. Date: May 21, 2008, 11:37 am | No Comments »

We've blogged about the use of Windows Server within branch offices several times here and here. Many of them kicked off with the introduction of Windows Server 2003 R2.

Today Citrix announced Branch Repeater, which they say is a new line of branch office appliances. Here's a description I received from Citrix:

Citrix Branch Repeater debuts with the ability to stage, cache, or pre-position content at the branch using technologies such as Microsoft Windows file services and Microsoft Distributed File System (DFS).  These technologies allow Citrix Branch Repeater to pre-position XenApp “Portable Application” installation files for rapid update and delivery to branch employees. The Citrix Branch Repeater also uses Microsoft ISA Server 2006 Web caching to accelerate delivery of web content to the branch.  But the repeater goes much further.  It can accelerate all TCP-based network traffic to and from the branch using Citrix WANScaler technology. And through integration with Microsoft Windows Server 2003 R2, local branch services are consolidated and delivered locally for optimal performance and availability.

In essence, Citrix Branch Repeater does three things that can help you provide better services to your remote or branch offices: (1) it stages streamed apps closer to the branch-based employees by using Citrix XenApp; it consolidates Windows-based branch services; and accelerates WAN app delivery.

There are three models to choose from:

  • Citrix Branch Repeater 100 - 1 Mbit appliance, $5,500 list
  • Citrix Branch Repeater 200 - 2 Mbit, $7,500 list
  • Citrix Branch Repeater 300 - 10 Mbit, $11,500 list

Patrick

Posted by WindowsServer, filed under Uncategorized. Date: May 20, 2008, 8:59 am | No Comments »

There are new demonstration videos of the upcoming Small Business Server 2008 and Essential Business Server 2008 on TechNet Edge.

Program manager Bjorn Levidow provides an overview of EBS management, including remote administration, add-in management and license tracking.  Becky Ochs, program manager for SBS, shows setup of SBS 2008, including the new Answer File tool.

Joel

Posted by WindowsServer, filed under Uncategorized. Date: May 19, 2008, 10:57 pm | No Comments »

Whew! Friday at 2:18PM we signed off on Beta 2 of Windows HPC Server 2008. It’s a good thing too since the Redmond team is looking at the first sunny and hot Northwest weekend this year. Mother nature usually gives us these days on weekdays. It’s been a hard push since November when we shipped our last beta. Since then we’ve done test runs on a cluster with over 1000 nodes, fixed over 1000 bugs, coded a bunch of new features, and made a bunch of design changes based on customer feedback. For example, one beta customer was using our new WCF Broker for financial risk modeling but wanted a totally reliable messaging solution. We built a solution leveraging MSMQ that still provides high throughput while allowing for reliable messaging.

 

Now that Beta 2 is finished our Technology Adoption Partners (TAP) will put this beta into production environments. We’ll carry pagers to help them out if they run into a crit-sit after hours. Actually, we have cell phones. Pagers have gone the way of sock punch cards, teletypes, and sock garters. I suspect there are teenagers wandering around that don’t know what a pager is.

 

Anyway, there’s a bunch of new stuff in Beta 2.

 

We checked in high availability for the head node and a new set of diagnostic tests to help people identify and troubleshoot their clusters. The new UI model is really coming together but for users more comfortable with command line interfaces we provide scripting support through COM and PowerShell. Finally, administrators can run administrative scripts in parallel across the cluster using our improved Clusrun feature.

 

A bunch of humbling (heh) usability testing pushed us to redesign the To Do List. It should be much easier for people to get through setting up a cluster, adding drivers to images, and configuring patching for the cluster (new feature!). The heat map is working so well we’ve thrown out our internal monitoring tools we use on Top500 runs.

 

After lots of, um, passionate debate we’ve finalized the APIs for job submission. It will continue to be easy for ISVs to integrate directly with our job scheduler while at the same time working with a cluster that may have thousands of jobs in the queue, each job with thousands of tasks.

 

A lot of people don’t know that we co-chair the HPC Basic Profile working group at the Open Grid Forum. With Beta 2, we ship our support for “HPC Basic Profile,” allowing us to interop with the LSF and PBSPro job schedulers.

 

We completed a few great Top500 runs in the last few weeks. We can’t talk about the numbers until the International Supercomputing Conference in June but it looks like Beta 2’s new MPI stack and new Network Direct RDMA interface are starting to hum.

 

Finally, our new programming model based on SOA is getting some nice usage from beta customers. Most of the feedback has come from folks in computational finance but there are also a couple folks in the life sciences industry that are kicking the tires. For example, what if you came up with a new theory about cancer and wanted to search through thousands of medical scans to see if your theory was correct. For Beta 2 we improved scalability, reduced latency and improved session initialization time. Beta 2 supports multiple WCF Brokers, allowing HPC Server 2008 to run really big SOA workloads.

 

So, we’re done with Beta 2. Lots of new features (whew) and lots of scalability improvements. We’ve posted build 1345, Beta 2, up at http://connect.microsoft.com

 

Thanks!

Ryan Waite

Group Program Manager - HPC

 

Posted by WindowsServer, filed under Uncategorized. Date: May 17, 2008, 11:19 am | No Comments »

After my The Sad State Of Programmers Part 1 : The Phone Interview series I got an email from a person.

Thank you so much for making me realise how little I know.  I’ve been programming first in Microsoft Access VBA and VB6 since 1997 (Some little playing before that) and I migrated my Company’s systems to SQL & .NET about three years ago.  I could answer only a couple of your questions without looking them up and then I don’t think I got ANY of them totally right!  I realise you probably have little time for an obvious idiot like myself, the ultimate example of WDP, but it would be great if you could point me in the right direction to start fixing the clear deficiencies in my knowledge.  I’ve spent years learning just enough for what I needed and no more and it clearly hasn’t done the job well enough.

The WDP reference is about this link: How Well Do You Interview And Do You Use Wizard Driven Programming?

 

This has been a while back now but I am still bothered by my incomplete answer. Here was my answer to him but I don't think I gave him the best answer possible. For one thing I did not mention Erland's, Tibor's or other people's sites which I read. I did not mention anything about webcasts either.

Here are some of my favorites books, I think it would make sense for you to
start with The Guru's Guide to Transact-SQL, it is not for SQL 2005 but for 2000, in my opinion this is still the best book out there to
teach you T-SQL
After that I would take a look at Inside Microsoft SQL Server 2005: T-SQL Querying this handles T-SQL exclusively with a lot of tricks and tips. If you need a little design in addition to T-SQL I would take a look at Louis' book Pro SQL Server 2005 Database Design and Optimization To learn about internals (indexes, pages, what sql is doing behind the scenes) take a look at Inside Microsoft SQL Server 2005: The Storage Engine 


That is it for books. http://www.sqldownunder.com/ has a bunch of podcasts which are very good.
Spend time on newsgroups and see if you can answer the questions there, study the answers carefully. I think I learned the most from visiting newsgroups. A good one is here: http://groups.google.com/group/microsoft.public.sqlserver.programming/topics
A lot of SQL Server MVPs answer questions there.
 
Read sql blogs, some of my favorites are here http://sqlblog.com/
A bunch of aggregated feeds: http://sqlblog.com/roller/roller.aspx (this is a list of all the other good SQL Server blogs)

 

The thing that triggered me to write a post is this question from the msdn forums: ADVISE.....Experts ! Please

How would you have answered this, what did you do to master SQL? What should you know to be considered a SQL master or an expert. FWIW I do not consider myself a SQL master.


Posted by Denis Gobo, filed under Uncategorized. Date: May 16, 2008, 10:57 am | No Comments »

Microsoft announced pricing and details on the upgrade to their bundle aimed at small and medium sized businesses, following their announcement of a beefier product last November.  Small Business Server 2008 (SBS) will continue to support up to 75 users, while Essential Business Server (EBS) can handle up to 250.  SBS has...

Posted by Microsoft Windows Small Business Server Blog posts on TechRepublic, filed under Uncategorized. Date: May 14, 2008, 10:14 pm | No Comments »

Since the launch of Windows Server 2008 on February 27th, I have had a phenomenal opportunity to hear a lot of positive feedback from IT Pros, developers and our partners.  I truly have enjoyed talking with customers from around the globe to hear their experiences and implementations. 

Since I am back in the office for the foreseeable future I thought I would take some time over the next couple of weeks to showcase some of the implementations of Windows Server 2008 that I have come across that have caught my attention.

One customer who has seen great results in the Web hosting area with WS08 is HostMySite.com. If you are not familiar with this company - they are a Web hosting company that owns and operates its own datacenters and networks and provides support for dedicated server environments.  HostyMySite hosts more than 85,000 web sites on 3,100 Servers (and growing).

One of the initial goals of their WS08 deployment was to offer the highest levels of application stability to their customers.  In addition HostMySite wanted to increase the site capacity on their web servers and minimize the amount of time spent troubleshooting.

Prior to Windows Server 2008 HostMySite was getting roughly 500 application pools on each of their servers. IIS 7.0 new application pool management features has allowed HMS to scale up to 3000 application pools per server.  In addition to increased application pool capacity, HMS was also able to reduce the numbers of servers.....what normally took 10 servers now takes 4.  (Although I wish WS08 was solely responsible for that metric - they moved to Dual Core Dell PowerEdge Servers)  Both of these are very impressive to step back and take a look at: 6x the application capacity on 60% less servers.

HostMySite is just one of the many customers seeing strong results with Windows Server 2008 and you can read more about their deployment story here.....it is actually a good read and you will see they are doing a lot more with the remote management capabilities of IIS 7.0

If you want more info on IIS, be sure to visit IIS.net. There is also a great blog post here that talks more about the hosting features in IIS 7.0.

Stay tuned for more.....
 
-Ward Ralston

Posted by WindowsServer, filed under Uncategorized. Date: May 14, 2008, 12:23 pm | No Comments »

Top 10 IT headlines Can Microsoft win over enough developers to change the paradigm? TechRepublic Business PCs are going nowhere fast ZDNet Why are we ignoring Moore's Law? TechRepublic Here comes the government to fight cybercrime! [shudder] TechRepublic Microsoft to raise Windows Small...

Posted by Microsoft Windows Small Business Server Blog posts | TechRepublic, filed under Uncategorized. Date: May 14, 2008, 8:12 am | No Comments »

Good news. Today we opened up the Public Preview for Windows Essential Server Solutions - Small Business Server 2008 and Essential Business Server 2008.  Visit here to find out how to download and evaluate the Release Candidate 0 versions of both.  EBS is available now, SBS will be up within a few weeks - but you can sign up today and be notified when it is ready.

We also unveiled pricing for SBS 2008 and EBS 2008.  Both products offer big savings versus buying the similar component products separately, not to mention the time and effort saved by the Solutions' integrated, SMB-oriented set up and management.  We've made a lot of changes to SBS as a product, so the price has changed.  In most 1-75 user cases, SBS 2008 Standard is actually less expensive than SBS 2003 Standard.  SBS 2008 Premium is now a two box solution with an additional copy of Windows Server and SQL Server running on a second box, in order to provide a great application platform - a big request from partners and customers.  There are a number of changes to make SBS CALs more flexible and cost-effective, too - see here for details.

Joel Sider

Posted by WindowsServer, filed under Uncategorized. Date: May 13, 2008, 11:30 am | No Comments »

« Previous Entries Next Entries »


Search Engine Optimization and SEO Tools