Solved

Adding Indexes to Table hurts query performance (self-join)

Posted on 2007-11-26
5
834 Views
Last Modified: 2012-06-27
I'm optimizing a query on SQL 2000.  The query joins a single table to itself 5 times to get various MAX(values).  

When I add a large covering clustered (or non-clustered index) to the table to help the query, performance suffers greatly.  This is a select statement only.

Why would a large index negatively impact read performance ?
0
Comment
Question by:JaffaKREE
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:SQL_SERVER_DBA
ID: 20352377
DO REBUILD
0
 
LVL 6

Author Comment

by:JaffaKREE
ID: 20352448
Rebuild the index ?  I've just created it.
0
 
LVL 18

Accepted Solution

by:
JR2003 earned 500 total points
ID: 20352475
How many rows has the table?
Are you accessing columns that aren't in the index?
Can you paste the query in with the indexes you have created?
0
 
LVL 6

Author Comment

by:JaffaKREE
ID: 20352547
> Are you accessing columns that aren't in the index?

After looking at this, I believe I made a mistake and excluded a necessary column from the index.  

I was concerned that the process, since it was accessing the same table/index 5 times, may have been deadlocking/blocking itself.


0
 
LVL 18

Expert Comment

by:JR2003
ID: 20353758
sometimes it does take longer using an index depending one how many rows are accessed and what columns are on the index.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

685 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