To index fields or not

G

GL

Hi,

What are the advantages and disadvantages of making the fields of a table
indexed?
Is there any difference when making a yes/no field indexed?

Thank you
GL
 
D

Douglas J. Steele

It's unlikely that a field that can only have two values would benefit from
indexing.
 
J

John W. Vinson/MVP

GL said:
Hi,

What are the advantages and disadvantages of making the fields of a table
indexed?

If you want to sort by or search for the values in a field, the field should
be indexed to allow better performance. If you use a field as a Primary Key
it *must* be indexed (and will be automatically indexed by the Primary Key,
so you need not and should not create an extra index).
Is there any difference when making a yes/no field indexed?

Generally it's not needed, as Douglas says; the one exception is if there
are very few records with one value, and you'll often be filtering or
searching for this value. For example, you might have a yes/no field Active,
with most records having False and only a few records of current interest
with True. In my experience, an index on this field will let you use a Query
with a criterion on this field and narrow in on the few Active records more
quickly than an un-indexed search.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top