Advertisement

01.16.2008 at 08:15AM PST, ID: 23087412
[x]
Attachment Details

Primary Keys and indexing for Performance

Asked by rito1 in MS SQL Server

Tags:

Hi All

I have a table that has 21 columns and 860,000+ rows of data. Currently this table doesn't have any indexes or a primary key. It is now starting to struggle particularly with queries using DISTINCT statements.

I have to work out what indexes to add to the table to help it's performance but in the meantime does just adding a primary key help with speed?

Also if there are several columns that are used within different stored procedures, would there be any harm adding several indexes to the 1 table other than the increace in capacity?

Many thanks

Rit
Start Free Trial
[+][-]01.16.2008 at 08:25AM PST, ID: 20673252

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: SQL Server
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 3
Solution Grade: A
 
 
[+][-]01.16.2008 at 08:27AM PST, ID: 20673272

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.16.2008 at 08:30AM PST, ID: 20673296

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.16.2008 at 08:34AM PST, ID: 20673336

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.16.2008 at 08:42AM PST, ID: 20673423

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628