Solved

Issue With Date Index In SQL Server 2005

Posted on 2008-10-08
7
542 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

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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