<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>optimisation on AdaTheDev Blog</title><link>https://www.adathedev.co.uk/tags/optimisation/</link><description>Recent content in optimisation on AdaTheDev Blog</description><generator>Hugo -- gohugo.io</generator><managingEditor>adathedev@gmail.com (Adrian Hills)</managingEditor><webMaster>adathedev@gmail.com (Adrian Hills)</webMaster><lastBuildDate>Wed, 26 May 2010 08:41:00 +0100</lastBuildDate><atom:link href="https://www.adathedev.co.uk/tags/optimisation/index.xml" rel="self" type="application/rss+xml"/><item><title>Optimising wildcard prefixed LIKE conditions</title><link>https://www.adathedev.co.uk/2010/05/optimising-like-conditions-with.html</link><pubDate>Wed, 26 May 2010 08:41:00 +0100</pubDate><author>adathedev@gmail.com (Adrian Hills)</author><guid>https://www.adathedev.co.uk/2010/05/optimising-like-conditions-with.html</guid><description>Suppose you want to write a query to find all products in your database that have a name beginning with &amp;ldquo;Long-Sleeve&amp;rdquo;. You&amp;rsquo;d more than likely use something like below (examples based on AdventureWorks LT sample database):
SELECT name FROM SalesLT.Product WHERE name LIKE &amp;#39;Long-Sleeve%&amp;#39; This produces a good execution plan, performing an index seek on the nonclustered index that exists on the name column. If you look at the seek operation, you&amp;rsquo;ll see the query optimiser has done a good job of ensuring an index can be used by looking at the seek predicate:</description></item><item><title>Optimising date filtered SQL queries</title><link>https://www.adathedev.co.uk/2010/02/optimising-date-filtered-sql-queries.html</link><pubDate>Sun, 21 Feb 2010 16:55:00 +0000</pubDate><author>adathedev@gmail.com (Adrian Hills)</author><guid>https://www.adathedev.co.uk/2010/02/optimising-date-filtered-sql-queries.html</guid><description>How you structure your SQL queries is very important and choosing the wrong approach can have big effects on the performance of the query.
One of the key things that should flag up the potential for needing optimisation, is if you are using a function/calculation within a WHERE clause. These can lead to inefficient execution plans, preventing sub-optimal index use.
A classic example to demonstrate this is when querying the data for a specific month.</description></item></channel></rss>