We help IT Professionals succeed at work.

MySQL Index's

Robert Granlund
on
72 Views
Last Modified: 2019-01-31
MySQL Database.  How many INDEX's should a table have?  What indexs should they be? Primary, Foreign?  What is the best setup?
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2019

Commented:
>>How many INDEX's should a table have?

As many as it needs.  Indexes are based on usage.  You need to look at how the applications use the data and created indexes to benefit the queries.

OVER INDEXING is almost just as bad as under indexing.

>>What indexs should they be? Primary, Foreign?

A table can only have one primary key.  Foreign keys are based on the tables relationships so as many as you need.

>>What is the best setup?

It is based on the applications
CERTIFIED EXPERT
Most Valuable Expert 2018
Distinguished Expert 2019
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.