SQL Performance

Why Trust Techopedia

What Does SQL Performance Mean?

SQL
performance is measured by how efficiently and quickly SQL queries are able to
perform the required function. SQL performance can be measured by the time it
takes to complete the operation and whether the output of the operation matches
the expected requirements. SQL performance can drop below a certain standard
due to various reasons, but there are ways to improve performance.

Advertisements

Techopedia Explains SQL Performance

SQL can
perform both simple and complex operations. An example of a simple operation can
be retrieving the dates of birth of all employees in a certain department, while
that of a complex operation can be retrieving the dates of birth of all
employees in a large enterprise whose names end with the letter P, who
have passport numbers starting with 54 and have traveled outside the United
States in the last 15 years. The more complex the operation, the longer the amount
time needed.

There are many ways to improve
SQL performance, including:

  • Multiple joins in a single query should be avoided.
  • A set-based query should be used
    instead of a cursor-based query.
  • Non-correlated scalar sub-queries should be avoided in
    standard queries.
  • Multi-statement
    Table Valued Functions (TVFs) should be avoided as part of the query.
  • Indexes should be used as efficiently
    as possible.
  • The columns in an index should be positioned carefully.
Advertisements

Related Terms

Margaret Rouse
Technology Specialist
Margaret Rouse
Technology Specialist

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.