I want to make my backend as efficient as possible, so I thought to add
indexes on any column that might be a parameter in a Where clause, etc.
When do I have to worry about adding too many indeces?
In an Access table, you'll have a limit of 32 indexes; you don't have to worry
much because the program will simply refuse to add the 32nd index.
More subtly, you face a tradeoff of costs and benefits. Additional indexes
will speed data *retrieval*, but they will slow data *addition* (and changes
to data); each time you add a new record, or change a value in an indexed
field, the program must not only add the record to the table, but also to all
the affected indexes. Since an index is a tree structure, this can be an
expensive process. In addition, the indexes take up disk and storage space
(probably not a major issue but if your database is very large, it could be a
problem).
I remember years ago on a big Oracle database having to go through some pretty
extensive testing, long discussions with the DBA, and some extensive analysis
to figure out which indexes were helpful on balance.
A lot depends on your table size. With a 5000 row table, the time savings on
an indexed search vs. a full table scan may be imperceptible to the user; on f
500,000 row table, it's going to be very obvious!
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also
http://www.utteraccess.com