[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Indexes again!!!!

Asked by higgsy in MS SQL Server

Tags: index

Hi,

I'm struggling to get my head round indexes even after having a few explanations, im getting closer but its still well confusing....i want to list a few scenarios within my database, then hopefully if suggestions can tell me the best type of index etc i should be able to put this into practice elsewhere...

FIRST SCENARIO

Firstly, i have a users table, 20,000 records, unique primary key called Users.UserID. I have an artistprofiles table, maybe 15,000 records, linked by a foreign key called ArtistProfiles.UserID, there is also a text field in ArtistProfiles called Artistname.     ArtistProfiles.UserID is frequently joined, or referenced in where clauses with the Users table. Frequent text searches are executed on the ArtistProfiles.Artistname field. Therefore, after reading as much as my head can handle on indexes, i was going to do the following:

ArtistProfiles.ArtistID - Make this a unique index (What are the options, Constraint or Index, and also Ignore Duplicate Key) (Dont think this needs to be a primary key does it???)
ArtistProfiles.Artistname - Non-unique Non-clustered index.

SECOND SCENARIO

I have a table called Charts, 1 record created every week, currently 200 records...Unique and Primary key called ChartID (is a primary key required, i have read that if there are not masses of records a PK could slow it down, yet it needs to be unique so am i better creating it as a unique, clustered index??) Then i have a table called ChartEntries which has a foreign key called ChartID - this cannot be unique in this table as there could be 40 records all relating to the same chartID - therefore MSSQL wont even let me create the index, do i therefore need to add a unique key on the table as perhaps a PK....this table could potentially have thousands of records.

The bit im struggling on, no matter how much i read up on it, is how to decide which fields should be either indexed, whether they should be clustered or non-clustered and whether the field should be a primary key....Does anyone have a decent set of guidelines, that you can almost put any scenario/design into, which will aid you in deciding what type of index, if any, to put on a column???

Thanks guys

Al
[+][-]09/09/04 03:06 AM, ID: 12014682Accepted Solution

View this solution now by starting your 30-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: index
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 3
Solution Grade: A
 
[+][-]09/09/04 04:46 AM, ID: 12015243Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 05:08 AM, ID: 12015391Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 05:17 AM, ID: 12015450Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 05:40 AM, ID: 12015633Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 05:54 AM, ID: 12015767Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 06:18 AM, ID: 12016045Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 06:21 AM, ID: 12016083Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 06:24 AM, ID: 12016107Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 06:47 AM, ID: 12016389Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 06:58 AM, ID: 12016527Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/09/04 07:01 AM, ID: 12016572Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/10/04 06:10 AM, ID: 12270731Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
[+][-]10/11/04 02:00 AM, ID: 12274663Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92