SQL

SQL

A community portal about SQL with blogs, videos, and photos. According to Wikipedia.org: SQL is the most popular computer language used to create, modify, retrieve and manipulate data from relational database management systems. The... [more]

A community portal about SQL with blogs, videos, and photos. According to Wikipedia.org: SQL is the most popular computer language used to create, modify, retrieve and manipulate data from relational database management systems. The language has evolved beyond its original purpose to support object-relational database management systems. It is an ANSI / ISO standard.

Database Optimization Techniques to Increase SQL SERVER Performance - Part I - Increase SQL Server stored procedure performance

1) Increase SQL Server stored procedure performance with following three tips:

        Stored procedures plays a vital role in enhancing the performance of the database. The following three tips will help us to maximize database performance, when stored procedures are used.

Use NOCOUNT:
           If NOCOUNT option is turned off, on each operation: stored procedures returns information concerning the number of rows affected and it increases network overhead. By default the Option NOCOUNT will be turned off.  If we turn on NOCOUNT option, stored procedures will block row count information so that it will reduce the network overhead occupied with information communication to the user.

Use return values:
           Queries are used to validate information or to return a single value. The return value of stored procedure can be used to retrieve a single value from a query and mainly useful when inserting a new record. The information necessary for retrieval is the primary key value. Place the statement “RETURN <value>” at the end of the query to utilize the return value in stored procedure.                 
        
Optimize table access with NOLOCK:
          Transaction safety is not mandatory for most of the database access. This is apparent in MySQL database product that it does not contribute any record locking capability. Any access to a database table or a stored procedure in SQL will make tremendous performance gains when a table hint is used, which lets the SQL engine ignore and not perform locks for a given function.

Sponsors
Comments
Be the first to leave a comment!
Add a Comment:
Already a member? Log In
Sponsors
About the Author

0 Kudos
Top Geek Articles
Celebrities on the Phone
Cell phones are to celebrities like bats are to baseball: no one runs too far without them.
Why every guy should buy their girlfriend Wii Fit.
Gratuitous...
Hot Geeks -- The Sexiest Geeky Girls
These girls are gorgeous AND they'll play Warcraft with you. Doesn't get much better than that.
More From Zimbio
Copyright © 2009 - Zimbio, Inc. Some rights reserved.