Showing posts with label Articles. Show all posts
Showing posts with label Articles. Show all posts

SQL Server Performance Tuning Techniques - Set 2

Sunday, March 13, 2011

11. Use Indexed Columns in where clause columns as they return results faster.
12. Create a primary key on each table you create and unless you are really knowledgeable enough to figure out a better plan, make it the clustered index
13. Create a primary key on each table you create and unless you are really knowledgeable enough to figure out a better plan, make it the clustered index.
14. Create an index on any column that is a foreign key.
15. Use set nocount on at the top of each stored procedure and set nocount off at the bottom.
16. Avoid using temp table unnecessarily, if needed explicity create them.
17. To help identify long running queries, use the SQL Server Profiler Create Trace Wizard to run the "TSQL By Duration" trace.
18. Use Joins instead of Subqueries.
19. "SET NOCOUNT ON" reduces network traffic between server and client.
20. use the SQL Server's Profiler Create Trace Wizard to run the "Profile the Performance of a Stored Procedure" trace to provide you with the data you need to identify poorly performing stored procedures.
21. Use covering index whereever needed, it reduces logical and physical IO and increases performance.


1.www.codecollege.NET 2.http://www.interviewsguru.com 3.The Encylopedia of Web Sites 4.Blogging and Earning

SQL Server Performance Tuning Techniques - Set 1

1. Use actual column names instead of '*' in the queries.
2. HAVING clause is used to filter the rows after all the rows are selected. It is just like a filter. Do not use HAVING clause for any other purposes.
3. Try to minimize number of subqueries in your query
4. Avoid using IN unnecessarily as IN is slowest.
5. IN is efficient when most of the filter criteria is in the sub-query.
6. EXISTS is efficient when most of the filter criteria is in the main query.
7. Use EXISTS instead of DISTINCT when using joins which involves tables having one-to-many relationship.
8. Try to use UNION ALL in place of UNION.
9. To store large binary objects, first place them in the file system and add the file path in the database.
10. Best practices :
a) Use single case for all SQL verbs
b) Begin all SQL verbs on a new line
c) Separate all words with a single space
d) Right or left aligning verbs within the initial SQL verb


1.www.codecollege.NET 2.http://www.interviewsguru.com 3.The Encylopedia of Web Sites 4.Blogging and Earning

TFS - The in and out - Chapter I ( An Overview)

Sunday, January 31, 2010

Introduction:
Here we are going to see the functioning of TFS (Team Foundation System), Build, Branching, management, etc. TFS Build is nothing but MS Build integrated into it. With Team Foundation Build, enterprise build managers can synchronize the sources, compile the application, run associated unit tests, perform code analysis, release builds on a file server, and publish build reports.
What’s New:
1. Web Access
2. Continuous Integration
3. Scheduled Build
4. Multithreaded Builds

TFS Editions:
There are 4 editions in TFS, they are:
1. Architecture
Modeling.
2. Database
Database Deployment, DB Testing.
3. Development
Code Analysis, Code Metrics, Profiling.
4. Test
Load and Manual Testing.

Types of Build:
1. Automated Builds
This build happens daily or weekly on a specific time automatically. Build automation is about collecting, assembling, validating, and auditing.
2. Manual Builds
o Milestone Builds
This build is taken on such situations like, on completion of some specific feature, for an integration that is done to the system.
o On Demand Builds
This build happens based on specific demand like Merge scenario, etc

The Build Process:
The build process is divided into 3 phases, they are:
1. Pre-Build Activities
Generally we do the Build related settings here, For ex: setting the configuration of the build like "Debug|Any CPU".
2. Build
This includes the Build, the Unit testing, and then the code analysis which are done along with the build.
3. Post-Build Activities
In this activity, the built files will be dropped to specific locations and project specific activities like taking a build report and mailing it to the developers will be done.

Branching and Merging:
Branching:
The main reason for taking a branching and merging is for the reason of Parallel development. A branch is a replica or a copy that is taken from the main for a specific purpose.

Types of Branches:
There are 3 types of branching, they are:
1. Main branch
This is the stable snapshot of the product. This will be shared with Testing and deployment team.
2. Development branch
This is where the development for the next version is done.
3. Production Branch
This will have the sources of your released products or soon to be released products.

Branch Plans:
There are 3 types of branch plans, they are:
1. Basic
In this there will be MAIN, DEV and Release branches.

2. Standard
In this there will be MAIN, DEV, Service pack, and Release branches.

3. Advanced
In this there will be MAIN, DEV, Service pack, Hot fix and Release branches.

Branching Scenarios:
There are 4 types of branching, they are:
1. Release Isolation
This is done when we need to work on multiple releases in parallel.
2. Feature Isolation
This is done when we want to work on some new functionality that is considered risky
or experimental.
3. Team Isolation
This is done for sub-teams, where one teams work should not affect others’.
4. Integration Isolation
This acts as a staging area for merges and active development happens here. After the merge becomes stable it is merged to other branches.

Merging:
It is a process which takes the changes in the source branch to the destination branch. You can simply do the merge operation by right-clicking on the DEV branch and selecting Merge. When any conflicts occur between the branches, then rely on the DEV branch.

Types of Merging:
There are 2 types of Merging, they are:
1. Based Merge
This happens when there is a relationship between the parent and child branches. This is the type of merge which is mostly done.
2. Baseless Merge
This happens when there is no relationship between the parent and child branches. As of now TFS doesn’t support merge between 2 child branches.

Some Terminologies:
1. Continuous Integration
It is a type of Build which happens on every check-in.
2. BVT
Build Verification Test.
3. Build Agent
It is a dedicated machine on which the build happens. It needs to have Build service installed in it.
4. Forward Integration
It is an integration which happens from the parent to the child.
5. Reverse Integration
It is an integration which happens from the child to the parent.
6. Release Vehicle
This says how your product reaches your customer (Ex: Hotfix, Release, etc).
7. Hotfix
It is a customer blocking bug.
8. Service Pack
It is a collection of Hotfixes and features.
9. What is shelving in TFS?
Shelving is a way through which you save your code to TFS without checking in. If you want you can unshelve it whenever you want. Generally it is used for reviewing purpose

Code to hide and show a div tag using javascript onmouseover and onfocus

Monday, January 18, 2010

<html>
<head>
<script language="JavaScript">
function showhide(id, visibility) {
document.getElementById(id).style.display = visibility;
}
</script>
</head>
<body>
<a href='#' onMouseOver="showhide('divContent', 'inline');" onMouseOut="showhide('divContent','none');" onfocus="showhide('divContent','inline')"; onBlur="showhide('divContent','none')";>This program shows and hides a div using javascript.</a>
<div id="divContent">This program shows and hides a div using javascript.</div>
</body>
</html>
<a href="http://www.codecollege.NET">www.codecollege.NET</a>

More Articles

Monday, September 14, 2009





1. Purpose and Usage of Partial Class




2. Design Patterns for all – Chapter I (Introduction to Design patterns and OOPs)




3. Design Patterns for all – Chapter II (Singleton Pattern)





4. Design Patterns for all – Chapter III (Factory Pattern)





5. FxCop – Part I (Introduction)





6. FxCop – Part II (A startup lesson on using FxCop)





7. FxCop – Part III (A detailed explanation over Project)





8. SharePoint for all – Chapter I (Introduction to the basics of SharePoint)





9. DataConnections in InfoPath 2007- Part I





10. Function to remove Cache Problem with IE




LinkWithin

Blog Widget by LinkWithin

Recommended Books