Index Reorganize and Rebuild in SQL Server

I have already mentioned quite a few times since now in few of my previous articles that Index could be the key to boost up performance of your “SELECT” query but highly fragmented Index could degrade the performance of your query.
When you created an index, sorting are done and in case of clustered index, physical data get stored page wise but after regular Insert/Update/Delete in the same table, fragmentation comes into the picture where your physical data order doesn’t match up with your logical data order exists in data page.  If there is any heavy fragmentation you find for any index, you should try to remove this by using Index reorganize or Index rebuild.
Let us understand what the exact meaning of Reorganize and Rebuild is.
Reorganize Index defrag the fragmented pages at leaf level, in simple language, it arrange data in leaf page level and if it find any empty space in any page, it removes it so free space could be claimed. This action is online action; means while doing this action on live server, it won’t block any objects (like table) for long time and you can query your object (database Table) while this operation in progress. Reorganize Index consume less resource as compared with Rebuild Index but Reorganize Index is ideal for low fragmented Index, let us say if your Index fragmented percentage is between 5% to 40%, you can use Reorganize Index otherwise go for Rebuild Index to gain proper benefit.
BTW, if you index fragmentation is less than 5%, then don’t need to do anything as even after reorganizing or rebuilding, you won’t get any more boost up as less than 5% fragmentation is not really a big deal and that is why, you don’t need to add any overhead on your server by doing reorganizing or rebuilding.
Rebuild Indexdrops current index and recreate Index again, this consumes high resources of the servers but it is worth doing if you Index fragmentation percentage is higher, let’s say more than 40%. While doing Rebuilding, objects get locked so you won’t be able to query (if you have not used WITH (ONLINE=ON) option). 
Based on my personal experience I personally prefer to “Rebuild Index” on off hours or may be in weekend if table is very big because sometime, it may take few hours or a day.
Now, question comes into the picture that how can I decide the fragmentation of the Index? Well it is fairly very simple, you have to query system function “sys.dm_db_index_physical_stats” and you have to pass your database name and table id in this function and it will return with very crucial information about your indexes on the specified table but it will not return Index name but it will return, Index ID and that is why, we have to make one JOIN of this “sys.dm_db_index_physical_stats” function with “sys.Indexes” system catalog.
SELECT
      sysin.name as IndexName
      ,func.avg_fragmentation_in_percent
FROM
      sys.dm_db_index_physical_stats (DB_ID(), OBJECT_ID(N’orders’),NULL, NULL, NULL) AS func
JOIN
      sys.indexes AS sysIn
ON
      func.object_id= sysIn.object_id AND func.index_id = sysIn.index_id;
I wanted to look the index details of my table “Orders” so I used my table name but you can replace the table name you want.
Hope you are now clear when to use rebuild and when to use reorganize. It is very simple, if you see values between 5% to 40% in your “avg_fragmentation_in_percent” field of above query, go for reorganize, if you see >40% then go for rebuild and if less than 5%, get back to your chair and have rest, there is nothing to do in this matter.  LOL
Once you decide whether to do Rebuild or Reorganize, you have use very simple query to do this operation on your table. Have a look at below queries.
–I wanted to reorganize my index, named “idx_refno” on orders table
ALTER INDEX idx_refno ONOrders REORGANIZE
GO
–I wanted to reorganize all my indexes which are there for orders table
ALTER INDEX ALL ON Orders REORGANIZE
GO
–I wanted to REBUILD my index, named “idx_refno” on orders table
ALTER INDEX idx_refno ONOrders REBUILD
GO
–I wanted to REBUILD all my indexes which are there for orders table
ALTER INDEX ALL ON Orders REBUILD
GO
BTW, I have created Index “idx_refno” and “orders” table in one of my previous article of Index, if you want to use the same object, have a look at the table and index script at here.
Do drop your comments about this concept!!!

if you want to refer all other articles related to index, click here.

Happy Indexing!!!
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Do you know Index Statistics in SQL Server?

This concept is based on Index so if you want to clear up your basics about different type of index available in SQL Server, do lookup here.
In order to understand the concept of “Index Statistics”, you must be aware with the concept of “Query Selectivity”. 
If you create an Index on any field in your table and execute “SELECT” query on the same table with the field in “where” clause which you have defined as “Index Key Column”, it is not guarantee that the index you have defined, would be used. 
Question might pops up in your mind that whether SQL Server making any mistakes by not using my Index and scanning all rows? 

No, SQL Server is not making any mistake in this case but it is being smart by choosing the proper, right and efficient way to execute your “SELECT” query.

If your conditions lied in “WHERE” clause, “Having” clause and “JOIN” statements returns almost all rows or majority of rows than optimizer wouldn’t waste the time to call Index, find the desired value from Index and return actual row from table. Rather than doing this, SQL Server would directly scan complete table and return desired output, if optimizer thinks that table scan would take less time than Index call. This is the concept of “Query Selectivity”.
After reading above paragraph, one more question might pops up in your mind again that without even executing query, how do SQL Server take decision to go for Index or not? How do SQL Server know that whether most of the rows would be return by query?
Answer to this question lies under “Index Statistics”.  When you create an index, not only data get sorted and stored in leaf level pages of Index with Pointer or actual data in case of clustered index but it creates “Histogram” too. This histogram tells optimizer that how many rows would be returned by given condition in “SELECT” query. SQL Server would take decision based on the answer of Histogram whether to call Index or not.
We have created one clustered index in one of my previous article here. I am going to use same index, named “idx_refno”, to demonstrate “Histogram”.
–we had orders table in SQLHub data and Index named “idx_refno”
–use the same here
DBCC SHOW_STATISTICS (‘Orders’,‘idx_refno’)
After executing above query, it will return three tables as a result of that query. Look at the below screen shot.
 
1st table would return some important information about Index like Index name, last update date of index etc.
2nd table would return information about Index Key column, its density and length of key column.
3rd table would return information about “Histogram”, SQL Server uses this to decide how many rows would be return based on your “SELECT” query.
For example: you can see last row of third table which has “2057058364” in “Range_HI_KEY” column and “900” in “EQ_Rows” column. It means that, if you pass “2057058364” to your “RefNo” column, you will get “900” rows.  Try it out.
–you might have different values in your refno column
so confirm from your histogram table and change it in WHERE clause below
–before executing this query
SELECT * from orders where refno=2057058364
See the screen shot below:
 
So, do you know Index Statistics in SQL Server, now?

if you want to refer all other articles related to index, click here.
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile

Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

List of articles about Index in SQLHub.com

Yesterday evening, while reading my recent Index articles, one of the fellow .NET developer asked me, “Sir, You have mentioned few things about size of index like this index is consuming big space and that index consuming low space, how can I see the size of Indexes and confirm what you have written?”
This was really a very genuine question but the answer was fairly simple T-SQL query on “SysIndexes” catalog view which I have already written but he was not aware with so finally I thought to cover up all my Indexes articles in one post so it would become good reference for some handy stuffs.
Here is the list of all articles I have written so far for the indexes:
4.)    Included column in Index
I will keep updating this page whenever I will write down something about Index.
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Filtered Index in SQL Server 2008/Denali

Filtered Index is nothing but just a feature of Non clustered index which I shown in previous two articles. It is just a non clustered index with WHERE clause in simple terms.
It is mainly used while you have big tables and you used to select only subset of data from that table. Like you have one big customer table and have one field of “Reference Person” in that table, it has NULL value if customer directly comes to us and has reference person’s name, if customer came from any of the reference. In this case if you want only those customers list that has reference person so that we can distribute some sort of consolation to those reference people.
The main advantage of “Filtered Index” is, it will have lower amount of root pages to store the data as it will consider only those rows which cater the needs of “Where” clause of “Filtered Index”.
Less number of pages means reduced storage size.  Since “Filtered Index” has only those data in root pages which caters the need of “Where” clause, means when you perform any DML operation like Insert, Delete or Update, “Filtered Index” will get effect only if it affects the Index Key which comes under the “Where” clause of Index so low maintenance cost. 
BTW, you can’t create “Filtered Index” on View but it will surely get benefit of the “Filtered Index” created on base table.
Let us check the impact of  “Filtered Index” practically.
–create one database which you can delete after running this example
create database SQLHub
GO
USE SQLHub
GO
–if orders table is already there. you can delete it than create new one with name “Orders”
IF OBJECT_ID(‘SQLHubFilteredIndex1’,‘U’) IS NOT NULL BEGIN
      DROP TABLE SQLHubFilteredIndex1
END
GO
–creating table
CREATE TABLE SQLHubFilteredIndex1 (ID INT IDENTITY Primary Key Clustered, OrderDate DATETIME, Amount MONEY, Refno INT)
GO
–inserting fack rows into table
INSERT INTO SQLHubFilteredIndex1 (OrderDate, Amount, Refno)
SELECT TOP 100
      DATEADD(minute, ABS(a.object_id % 50000 ), CAST(‘2010-02-01’ AS DATETIME)),
      ABS(a.object_id % 10),
      CAST(ABS(a.object_id) AS VARCHAR)
FROM sys.all_objects a
CROSS JOIN sys.all_objects b
Union All
SELECT TOP 100000
      NULL,
      ABS(a.object_id % 10),
      CAST(ABS(a.object_id) AS VARCHAR)
FROM sys.all_objects a
CROSS JOIN sys.all_objects b
GO
–run the following query with execution plan together and see the results in execution plan
–you can see execution plan with the following steps
–first select both of the below given query
–Press Ctrl+M
–press F5
SELECT * fromSQLHubFilteredIndex1 where OrderDate is not null
CREATE NONCLUSTERED INDEXidx_SQLHubFilteredIndex1 ONSQLHubFilteredIndex1(OrderDate)
WHERE OrderDate is not null
SELECT * fromSQLHubFilteredIndex1 where OrderDate is not null
GO
–if you wish, you can uncomment below code and delete SQLHub database
—-use master
—-go
—-drop database sqlhub
You can see in above screen shot that the same query ran faster after creating index.

if you want to refer all other articles related to index, click here.
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Included Column Index with non clustered index in SQL Server 2005/2008/Denali

My previous article was based on “Non clustered Index” and this article focuses on “Included Column” feature of Index which was introduced in SQL Server 2005 and still there in newer version.
As long as architecture of “Included Column” concerns, whatever columns you have defined under “Include” clause under the index, those will be stored on the Leaf pages, it won’t get stored on the Root page or Intermediate page of the index.
Now, let us talk little bit about the benefit we are going to get out of this feature.
The main feature is that, the columns you have under “Include” clause of “Create Index” statement would not affect the size of the index. Index has limitation that you can have it on maximum of 16 column / 900 bytes. So no matter how big columns you are going to use in your “Include”, you will get benefit for sure.
You should keep those columns in “Include” clause which generally comes under “SELECT” clause and not being used much in “WHERE”, “GROUP BY” or “ON” clause of “JOIN”.
We are going to create one table with big column size and will try to create Non Clustered Index on that.
–create dummy table and see whether we are able to create index on that or not.
create table NonClustCheck
(
Col1 char(500),
col2 char(400),
col3 char(10)
)
GO
–if you will try following idex, you will greeted with error message as follows:
–Msg 1944, Level 16, State 1, Line 1
–Index ‘idx_NonClustCheck’ was not created. This index has a key length of at least 910 bytes.
–The maximum permissible key length is 900 bytes.
create nonclustered indexidx_NonClustCheck on NonClustCheck(col1,col2,col3)
go
–you can create following index on the same table
create nonclustered indexidx_NonClustCheck1 on NonClustCheck(col1)
INCLUDE(col2,col3)
go
we finally we have created non clustered index with one key column (Col1) and two included column (Col2 and Col3). Let us check whether this index gets scan or seek or optimizer decides not to use this.
–well there is no data in this table yet,
–even just wanted to see whether Non clustered index is having any effect or not.
–run following query with execution plan and you can see Index Seek
— Ctrl + M and than F5 to run query with execution plan.
select * from NonClustCheck where Col1=‘SQLHub.Com’
GO
–you can see Col2 is not as the Index Key,
–even you can see that our non clustered index is getting SCAN.
select * from NonClustCheck where Col2=‘hello’
GO
Hope this will be helpful to you. Do drop comments; it will encourage me for sure.
if you want to refer all other articles related to index, click here.
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Nonclustered Index in SQL Server

After finishing two articles on Index “Some basics about Index in SQL Server” and “Clustered Index in SQL Server”, this is now time to explore nonclustered index in SQL Server. There are only two major difference between Clustered and Nonclustered Index are as follows:
1.)    You can have only one Clustered index per table and 249 (till SQL Server 2005) and 999 (after SQL Server 2005) Nonclustered Index per table
2.)    Clustered Index stores actual row data in the leaf level and nonclustered index would stores only those columns which are included in nonclustered index and pointer to the actual row which may be in clustered index or in heap (know more about leaf, heap, RID etc. from here).
Like clustered index, you can have one or multiple columns defined in Nonclustered Index too. Order of the column defined in Nonclustered plays an important role to meet Index seek, as I told you in previous article too that Index seek is good than Index Scan, so one should try to meet up Index seek as long as possible.
We are going to use same database and “Orders” table defined in previous article “Clustered Index in SQL Server”.
–creating nonclustered index,
CREATE NONCLUSTERED INDEXidx_orderdate on Orders(orderdate,orderid)
–run following query with execution plan and see the results in execution plan
–you can see execution plan with the following steps
–first select below given query
–Press Ctrl+M
–press F5
SELECT OrderDate,orderid from orders where OrderDate = ‘2010-02-01 00:04:00.000’
You will see your nonClustered Index Seek in your execution plan.
 
There are few more indexes under the same category like INCLUDE columns, Filtered Index, Covering Index which we will be exploring very soon.
if you want to refer all other articles related to index, click here.
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Clustered Index in SQL Server

As per the promise I have made in “Some basics about Index in SQL Server” article, I am coming up with each Indexes of SQL Server and first and most important is “Clustered Index”. 
Understanding of Clustered Index:
As I told in previous article too that Index is the key of performance, good and managed Index could boost up your speed of retrieving of data from table.
Clustered Index contains actual data of the table in leaf level pages in logically sorted order (to understand root and leaf level page, click here). Since it is logically sorted, it doesn’t need to go for all data present there in Index. 
For example if you are looking for the phone number of “Ritesh Shah” in telephone directory, you can move to a page which has phone number of the person whose first name starts with “RI” and once all instance of “RI” over in directory, you don’t need to move on as there is NO CHANCE, you will get “Ritesh” anywhere in directory except those particular pages.
BTW, if you don’t have clustered index on your table, than your table would be called “HEAP”, which wouldn’t not have logically sorted data so if you are searching for “Ritesh Shah”, you can to check complete table as you never know, where you will find “Ritesh Shah”, just one method, go each and every row of table and check for matching criteria.
Like any other columns, you can define clustered index in more than one field too and all the columns covered up under the index, called key column.
While choosing a prime candidate for Clustered Index column in your table, you have to select the columns which meet few of the general criteria defined below. (you can say following criteria as a best practice while choosing index candidate)
–> You key column or combination of key columns should be unique and not null. If your You key column or combination of key columns are not unique than SQL Server has to add one more hidden column of 4-byte INT to make it unique. However, you can’t see that hidden column neither can query it directly; it would be purely for SQL Server’s internal use.
–> It should be short as wide key value would increase the depth of Clustered Index and will reduce the performance a bit and also increase the size of non-clustered index as it is being there as a reference in all non-clustered index.
–> Select less changing or no changing fields for you clustered index as Key value indicates the location of page where actual data resides, if you change this key value, row has to be deleted from that page and has to move to another appropriate page which reduces the performance and increase unnecessary overhead to IO.
Generally whenever you make Primary Key in any of your table, SQL Server itself create clustered index on it but if you want to keep clustered index on any other column(s) due to high selectivity on those column(s), you can do it.
Have you got bored of so long theory? Let us do some practical and check it out?
–create one database which you can delete after running this example
create database SQLHub
GO
USE SQLHub
GO
–if orders table is already there. you can delete it than create new one with name “Orders”
IF OBJECT_ID(‘orders’, ‘U’) IS NOT NULL BEGIN
      DROP TABLEorders
END
GO
–creating table
CREATE TABLE orders (OrderID INT IDENTITY, OrderDate DATETIME, Amount MONEY, Refno INT)
GO
–inserting 100000 fack rows into table (BTW, thank to Jacob Sebastian, copy in INSERT script from one of his demo to generate big table)
INSERT INTO orders (OrderDate, Amount, Refno)
SELECT TOP 100000
      DATEADD(minute, ABS(a.object_id % 50000 ), CAST(‘2010-02-01’ AS DATETIME)),
      ABS(a.object_id % 10),
      CAST(ABS(a.object_id) AS VARCHAR)
FROM sys.all_objects a
CROSS JOIN sys.all_objects b
GO
–creating clustered index, however it is not meeting the criteria I have
–given in article, but this is ok for example
CREATE CLUSTERED INDEXidx_refno ON orders(refno)
GO
–run both of the following query with execution plan and see the results in execution plan
–you can see execution plan with the following steps
–first select both of the below given query
–Press Ctrl+M
–press F5
SELECT TOP 10 * from orders whererefno=4
SELECT TOP 10 * from orders whereOrderDate = ‘2010-02-01 00:04:00.000’
GO
–if you wish, you can uncomment below code and delete SQLHub database
–use master
–go
–drop database sqlhub
If you execute both the query with “Actual Execution Plan”, you will see first query is having Index Seek and second query is having Index Scan. 
Seek and Scan is really interesting topic which I will cover later but just keep in mind that, Seek is good, Scan is bad as it will check all records of the index.
if you want to refer all other articles related to index, click here.

Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Some basics about Index in SQL Server

I wrote an article about index “Be selective while creating Index” on my blog few days back based on the questionI have received in my “ASK Profile” in BeyondRelational.Com.
After writing above article I felt to write few more stuff regarding Index as I still see so many queries, concerns regarding index in developer’s mind, especially who are .NET developer and have very less touch with SQL Server. I know this is not the task of .NET developer but there are so many companies in which .NET developer used to undergo the task of creating database table, SPs etc.
Since most of the people knew that Index is the key of good performance over SELECT statements, very few of them really know how to utilize this sword which has blade on both the side, if you don’t use it wisely, it will harm your performance too.
BTW, all discussion about index in this article is generic for SQL Server; it is not related to specific SQL Server version.
Before jumping more into the Index concept, let me tell you that all data in SQL Server being stored in page, one page consume 8KB. So whenever you create any table and insert data, it goes to one page, suppose you have 4KB of data in one row than two row will comes in one SQL Server page.
Understanding of Index:
Index is nothing but just a kind of data structure which helps optimizer to find data row easily and fast. You can compare it with the “Index” you get in almost all books. If you know the topic you wanted to find, look for it in Book’s Index and you will get page number where that topic is explained.
Generally you can define index on one or more than one column, if you define your index on more than one column, it is called “Composite Index”. All the columns you have created an Index on are called Key Columns.
Have you ever studied “B-Tree” in any of the OOPs languages like C++, C# etc.? Index is kind of “B-Tree” and store data in “B-Tree” structure. It suppose to have one Root Page, it may or may not have Intermediate page (based on the size of data) and one or more than one leaf pages. In sort, Root page would be the top of index structure and leaf page would be lower part of the index structure.
You will have entry of each row of your data table in leaf level pages sorted in logical order.  Mainly there are two type of indexes you can create on SQL Server table (I am not considering all new type of index comes up with each new version of SQL Server, I may cover those up in future article).
1.)    Clustered Index
2.)    Non-Clustered Index
You can have only one clustered Index on each table as Clustered Index stores data in logical order leaf pages of your clustered index has actual sorted data within and this is the reason why you can’t have more than one clustered index on your table.
As long as non clustered index concern, you can have up to 249 Non-Clustered Index per table up to SQL Server 2005 and in later version, you can have limit of 999. Non-Clustered Index don’t store data sorted physically in its leaf level pages but it stores the pointer of the each row of the included column. Pointer may points to clustered index key and if you don’t have clustered index in your table than pointer points to “Row Identifier”.
 “Row-Identifier” is nothing but the unique combination of File ID and Page Number and Slot Index crated by SQL Server to identify each row uniquely in absence of Clustered Index.
So this is it, for the basics of Index, I will come up with some more detailed article regarding each type of index very soon.
if you want to refer all other articles related to index, click here
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Answer BI Quiz and win IPAD

There is one more VERY interesting quiz is going on BeyondRelational.Com. SQL guru Jacob Sebastian always taking endeavor efforts to aware community with new and advanced technology related to SQL Server and this BI quiz is one of them. 
Why don’t you start participating and earn some more knowledge by studying answer given by experts or if you know the answer than share it with others and take opportunity to win IPAD?
I am one of the quiz masters there and my question is going to be aired on 15th Jun 2011 which you can directly access from here. Pattern to find the winner of IPAD, is the same which I have mentioned earlier at the time of first SQL Quiz, you can refer the same from here
Don’t wait, all question of SQL Server BI Quiz are open right now, start answering as much as you know to increase your chance to win IPAD.
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah

Tech-Ed 2011 on the Road in Ahmedabad

Ahmedabad (Amdavad) was fortunate to had “Tech-Ed 2011 on the Road” event on 11th Jun 2011. I have attended many Tech-Ed events in Ahmedabad but I am happy and surprised too with the overwhelming response this event gets this time. 
Event was held in AMA, Ahmedabad. Hall capacity was approx 300 person even organizers had to arrange chairs to accommodate more persons, so even Pinal & Jacob had to take initiative to find empty space in the room and arrange the chair there so more people can sit there. Hats off to their spirit and feelings towards community members. BTW, even arranging more chairs, many people were standing at the back of the hall without any complain and I am sure, they too were enjoying sessions.
We had back to back interesting technical sessions. 
1st session was taken by Mr. Mahesh Dhola regarding Light Switch which was quite interesting due to practical demos.
2nd Session was taken by Pinal and we all knew that his presentation and technical skills. It was not like just purely TECHNICAL SESSION but it was so interactive and been more interesting by his presentation skill. It was like our Gujarati idioms “Gyan sathe Gammat”. I really really really enjoyed it a lot. It was awesome, amazing. He used to give understanding of really really hard topic, like Wait Types, in very easy way which most of the people can’t do. Thanks to you Pinal.
After Pinal’s session, It was Ahmedabad’s true honor to have speaker like star Evangelist of Microsoft India, Mr. Harish Vaidyanathan. He took session for HTML5, CSS3, Javascript, though I have left web development for years but I thoroughly enjoyed his session, Especially Canvas, Video and Audio facility given in HTML5. It was really awesome, If I would not have attended this session, I would never know about these features this early as I have no touch with HTML now. Thanks Harish.
After Harish’s session, There was MOST AWAITED session there, which is LUNCH. J you know what??? “Gulab Jamun” and “Paneer Butter Masala Sabji”  are my favorite so enjoyed it a lot and wanted to had small nap but one more guest speaker “Dhananjay Kumar”  won’t let me do it by his good session over Microsoft’s “Mango Phone”.
He had small session but was interesting to see multitasking 3rd Party application functionality in Mango Phone. After this session there was no chance to sleep, no SQL guys could ever think to have nap in the session of legendary speaker Mr. Jacob Sebastian.
He is the proud of Ahmedabad and real SQL/XML guru. As Pinal has said in the starting of session, Jacob really felt us bad by his session, he show us what we were doing wrong so far everyday in our TSQL, he show us worst practices in TSQL code.
After finishing of this SQL session there was one more interesting session by one of my friend Tejas Shah on ASP.NET Tips & Tricks. He comes up with less slides and more practical example, people were happy to see the few of the very good tips from him.
After Tejas’s seesion, we had many gifts giveaway to the winners who won the quiz during the event and then we had tea after finishing the event and good chance for networking. 
Finally a BIG THANKS to Microsoft to give us this good opportunity.
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of http://www.SQLHub.com
Ask me any SQL Server related question at my “ASK Profile
Microsoft SQL Server Blog. Fight the fear of SQL with SQLHub.com. Founder is Ritesh Shah