Tuesday, December 28, 2010

Why is my keyboard changing to another languages?

On my business laptop and home desktop machine, both installed with Windows 7 64 bits, I have 2 keyboard languages installed. I have no idea why. I have English and Dutch. I only uses English but sometimes it switches during typing of a letter to Dutch. This is very annoying. I had no idea why, but today I discovered that a short cut is responsible for it.
The short cut ALT+SHIFT. For my all Windows short cuts are nice if you are aware of it. I think that most poeple are not aware of all short cuts of Windows 7, which can result in a negative user experience. If you really need to have more than one keyboard layout, you can use the ALT+SHIFT combination to change it back. If you only need one keyboard language you can remove the other keyboard layouts via:

Start, Control Panel, Clock Language and Region, Change keyboard or other input methods.
Tab Keyboards and Languages, press Change keyboards.
Now you can remove all keyboards you do not want to use.

Happy typing without the big suprise of a changed keyboard language.

Thursday, December 16, 2010

What triggers the update of statistics in my SQL 2008 database, when are the statistics out of date ?

Microsoft SQL Server 2008 collects statistical information about indexes and column data stored in the database. These statistics are used by the SQL Server query optimizer to choose the most efficient plan for retrieving or updating data. By default, SQL Server 2008 also creates and updates statistics automatically, when such an operation is considered to be useful. Sometimes it can happen that your statistics are not representative for your current data distribution which can result in a not efficient query plan. SQL Server 2008 determines whether to update statistics based on changes to column modification counters (colmodctrs).

If the statistics is defined on a regular table, it is out of date if:
  • The table size has gone from 0 to >0 rows.
  • The number of rows in the table when the statistics were gathered was 500 or less, and the colmodctr of the leading column of the statistics object has changed by more than 500 since then.
  • The table had more than 500 rows when the statistics were gathered, and the colmodctr of the leading column of the statistics object has changed by more than 500 + 20% of the number of rows in the table when the statistics were gathered.
  • For filtered statistics, the colmodctr is first adjusted by the selectivity of the filter before these conditions are tested. For example, for filtered statistics with predicate selecting 50% of the rows, the colmodctr is multiplied by 0.5.
One limitation of the automatic update logic is that it tracks changes to columns in the statistics, but not changes to columns in the predicate. If there are many changes to the columns used in predicates of filtered statistics, consider using manual updates to keep up with the changes.

More detailed information about database statistics can be found in this whitepaper: Statistics used by the query optimizer in Microsoft SQL Server 2008.

Monday, December 13, 2010

Microsoft SQL Server 2008 R2 System Views Maps.

To better understand the relations between all system tables and system views, a nice map is published which visualize all these relations. The Microsoft SQL Server 2008 R2 System Views Map shows the key system views included in Microsoft SQL Server 2008 and SQL Server 2008 R2, and the relationships between them.

The map is available in 2 formats:
  1. PDF
  2. XPS
To download the maps, click here

Wednesday, December 1, 2010

SQL Denali Codename Crescent what is it?

After the first sneak preview of Crescent during the keynote of Ted Kummert on SQLPASS we can talk about what Crescent is. Crescent is the code name of an ad-hoc reporting layer that will be released in the next version of SQL Server – Denali. Crescent is a major enhancement to SQL Server Reporting Services. Up to now, SQL Server Reporting Services (SSRS) didn't have a web-based report designer. Denali will change that by adding a brand new report authoring tool that will be powered by Silverlight. So, this will be the fifth report designer after BIDS, Report Builder 1.0 (not sure if RB 1.0 will survive SQL 11), Report Builder 3.0, Visual Studio Report Designer.

Besides bringing report authoring to the web, Crescent will redefine the report authoring experience and even what a report is. At this moment a Reporting Services report is static. Once you publish the report, the layout becomes fixed. If you want to make changes to the original design, such as adding new columns or switching from a tabular layout to a crosstab layout, you need to open the report in a report designer. Make your changes and republish the report.  Crescent will change all of this and it will make the reporting experience more interactive and similar to Excel PivotTable. I have seen a preview of Crescent and indeed it really looks nice. It enables people in the boardroom to play with the data. The end user can quickly create an interactive report by dragging metadata, and then with a few mouse clicks change the report layout without switching to design mode. In fact, Crescent doesn't have a formal design mode.

I'm very enthousiastic about Crescent. I see a lot of opportunities. Based on information in static reports, decision makers wants to have more and or detailed information. With Crescent they can 'play' with the data and help themselves much better. There is only disappointing thing to mention: Crescent will only be available in SharePoint mode. For companies without an ICT department, deploying and maintaining of a Sharepoint server can be too complex. I think that the decision makers of these companies will have the same need to 'play' with the data.
Crescent is not available in Denali CTP 1, but I hope it will come available in CTP2. I'm looking forward to 'play' myself with the data.