Solved

Issue With Date Index In SQL Server 2005

Posted on 2008-10-08
7
540 Views
Last Modified: 2008-11-17
We have some ETL loads running to load data into a SQL Server table. This table has an index defined on a date columns

For reporting purpose we are using this table (in join with 13 other tables) to generate a report.

When ever some data is loaded into the table through ETL the indexes for that particular date are getting messed up and the query is just long running for that particular dates.

Once the indexes are rebuilt the query returns results in 7 seconds. Kindly suggest some permanent solution for this issue
0
Comment
Question by:jsrams
[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
7 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 43 total points
ID: 22672450
you could drop the index before the ETL and add it again afterwards.
0
 
LVL 39

Assisted Solution

by:BrandonGalderisi
BrandonGalderisi earned 41 total points
ID: 22672470
Do you have a db maintenance plan that is reindexing your tables?  Any type of large data load (or purge) will not only fragment indexes, but will also mess with your statistics causing queries to run slow.
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 41 total points
ID: 22672472
if this ETL is loading lots of data, it might be considered to drop the index before and recreate it after the load.
0
 

Author Comment

by:jsrams
ID: 22672584
The data that is loaded through the ETL process is not more thatn 20000 records per day. Still is it preferred to rebuilt the indexes once the data load is done.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22672620
>>Still is it preferred to rebuilt the indexes once the data load is done.

If they are fragmented.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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