Adrian Hills 2/21/2010

Optimising date filtered SQL queries

Read Original

This technical article details SQL query optimization, specifically for date-filtered queries. It demonstrates how using functions like MONTH() or DATEDIFF() in a WHERE clause forces an index scan instead of a seek, degrading performance. The article provides a concrete example with test data, execution plans, and metrics, showing a 75% performance improvement by using a direct date range comparison.

Optimising date filtered SQL queries

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week