Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a complex query that returns results in 45 secs when run from the 01-05-11 to the 31-05-11, but when it is extended to the 01-06-11 it runs indefinately... THe tables are partition by month...

I think the indexes are aligned as they where created with the DB... I am assuming an additional one has been created and is not aligned,

How can I make sure the indexes are aligned with the table partitions

or can anyone think of anything else that could be causing this problem ?

share|improve this question

Do you rebuild indexes and statistics on a regular basis? If not I suggest you to schedule a maintenance plan, run it once and the try again. Also have a check on disks performance counters, especially avg disk queue lenght on data and tlog volume of your db server.

share|improve this answer
yes, all the normal maintenance, we have just upgraded the server, its 12 cores, 64bit 64GB of ram, but due to all these b****rd functions cant use more than 1 processor and is acting like a cursor as they reference other tables from the functions... needs to be written for sure, im just not the man for the job – Chris Wood Jun 8 '11 at 11:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.