"WindAndWaves" <ac****@ngaru.com> wrote in news:ScOwc.1058$GB4.35933
@news.xtra.co.nz:
Is there anyone who has some sound rules of thumb for using indexes.
Pretty old advice from
Microsoft® Jet Database Engine Programmer’s Guide!
The last paragraph (is it still valid?) may describe an issue which can be
overlooked.
**** quote ****
Use Indexes Cautiously
Although having indexes can reduce the time it takes to retrieve data, they
always carry a cost in maintenance and concurrency issues. When should a
field be indexed? There is no strict answer for this because it depends on
the type of application.
The first guideline is that fields containing highly duplicated data should
not be indexed (for example, fields with the Yes/No data type, and fields
that represent gender, state abbreviations, or country codes).
The second guideline is that fields should not be indexed simply to force
Rushmore to use more than one index. An example of this would be indexing a
field called City and a field called PostalCode in a customer table when
the application is always going to be using both fields for retrieval
purposes. In this instance, the PostalCode field is going to be the most
unique index and would return a result set faster if the City field was not
indexed. Because Rushmore doesn’t need to use the index on the City field,
omitting the index on the City field will reduce overall disk I/O. Of
course, if both values were not always being entered and they were used
alternatively and equally, then having an index on both fields would
probably be advantageous. Rushmore is best utilized on combined indexes
when they are required to generate a unique result set.
It is also important to remember that indexes create concurrency issues.
One index page represents many data pages. Therefore, modifying an index
page can cause users with data on an entirely different data page to be
locked out when trying to update the indexed field.
**** quote ****
--
Lyle
(for e-mail refer to
http://ffdba.com/)