Solved

SQL Server SLOW results for specific (smaller) date range

Posted on 2011-02-15
3
345 Views
Last Modified: 2012-05-11
I have a view that is comprised of another view and a table. It has 13,493 records. Not that big.

When I do a select ALL records, it takes about 3 seconds to return the dataset.

When I add a WHERE  (LoggedInDate >= '1/1/2010') AND (LoggedInDate <= '12/31/2010') it takes about 3 seconds to return the dataset of 11,172 records.
When I add a WHERE  (LoggedInDate >= '1/1/2011') AND (LoggedInDate <= '12/31/2011')  it takes about 15 seconds to return the dataset of 2,316 records.  At the bottom where it shows # of records its pulling it looks like it is chunking results in sets of 256 at a time.

I traced it back month by month and it looks like it starts this 'chunking' data results for anything loggedindate > 12/15/2010. The LoggedInDate is a datetime field. I checked other views, tables AND even those in different databases and realized that it was happenning to all of them.

Any ideas? Is there a process that was started that is stuck that I may not be seeing?
0
Comment
Question by:Bianca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 500 total points
ID: 34900623

Check if you have created proper index on LoggedInDate
0
 

Author Comment

by:Bianca
ID: 34900632
I hate to ask this but how do I know if its proper indexing?
0
 

Author Comment

by:Bianca
ID: 34900827
Nevermind, got it and it runs in a few seconds, thanks!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question