10 Rules For Increasing The Speed of SQL Queries PowerPoint PPT Presentation

presentation player overlay
About This Presentation
Transcript and Presenter's Notes

Title: 10 Rules For Increasing The Speed of SQL Queries


1
10 Rules For Increasing The Speed of SQL Queries
2
  • SQL Developers and DBAs help in getting the
    faster queries to many time tested methods for
    achieving the goal. Here are 10 rules for making
    the database faster and more efficient.
  • Do not use cursors always
  • There is a drastic decrease of speed if your
    cursors are used. There could be block of
    operations between the two which is actually
    longer than required. Thus concurrency in your
    system is decreased.

More...
Stay Connected For More Updates
3
  • If you cannot avoid using them
  • If at times you are unable to stop the usage of
    the cursor then run cursor operations against a
    temp table instead of a live table. The only
    update statement a the subset ofgainst the live
    table is very meager and it is a short time lock
    holder that can enhance concurrency greatly.
  • Intelligently use the temp tables
  • There are lots of situations where you can use
    the temp table for instance if you are joining a
    table to a large table then there is a condition
    on that large table for enhancing the performance
    by taking out the subset of data you require from
    the large table into a temp table and joining
    with that instead. For greatly decreasing the
    processing power this can help you a lot if you
    have lots of queries in the procedure for making
    similar joins to the same table.

More...
Stay Connected For More Updates
4
Prefer table-valued functions instead of scalar
While using a scalar function in the select list
of a query for boosting the performance by
changing it to a table-valued function and
include cross apply in the query. You can reduce
the query in half times.
  • Partitions in SQL server
  • Users of SQL Server Enterprise can take benefit
    of the data engine partitioning features which
    are automatic to speed performance. You can find
    simple tables are created as single partitions in
    SQL server that can later split into multiple
    ones as required.

More...
Stay Connected For More Updates
5
Thank You
  • Thus join the Institute of DBA to be a successful
    DBA professional in this field.
  • Stay connected to CRB Tech for more technical
    optimization and other updates and information.

Stay Connected For More Updates
Write a Comment
User Comments (0)
About PowerShow.com