Next Tip  Indexing Tables Tips For Microsoft Access

Don't Index Fields with Lots of Identical Data

Don't apply indexes to fields that contain much the same data. For example, indexing a Yes/No field is almost always a performance degrading operation. Similarly, if you have a number field that only contains two or three values, and index wouldn't be a good idea. To check the number of unique entries in an index, use the Access DistinctCount property. Compare this value to the number of records in the table and you can quickly see if the index is doing you any good.

This tip comes to you courtesy of Adam Cogan at SSW who can be found at http://www.ssw.com.au.  SSW runs the popular Access Users Group in Sydney.

Indexed Fields Should Generally Be For A Physical Purpose

Until such times as you are having performance problems, only index those fields where you are joining tables together in queries or where you have to avoid duplicates in a field or group of fields.

Indexes take up space in your database and whenever you save a record, you must also save the index.

Watch Out for Auto Index

If you open up Access and select Tools ... Options and then select the Tables / Queries tag you will find a field called 

Auto Index on Import/Create:

If you have any fields in your database with these prefixes or suffixes, you will find that you have indexes on the field whether you like it or not.  You may as well clear the "Auto Index on Import/Create" text box on this tab as this is a very unnecessary feature.

The standard keys featured here are

ID;Key;code;num

So look out for those fields cause your database will be bigger and slower than you think.

In Access 2007, you can check for and change this setting by viewing these pictures.

 

Watch Out For Replication Indexes

If you happen to come across a database that has replication indexes and the database no longer synchronizes with other databases, you will be likely to have fields with replication indexes that are not needed. These may have the name of GUID.

Before you take any of my advice on this issues, BACKUP your database. OK you have done that now you can check if the replication indexes are still in place. If they are, deleting the index will save you a lot of space in big tables. This is quite easy to do.

Now another thing to realize about these replication fields is that they are very large, about 30 characters in size.  Multiple this by 100,000 rows and you have a lot of space when compared to a long integer field.

The next step in clearing up replication index fields from a database is deleting the field itself. This sounds easy but it isn't as you need to transfer the table to another database using append query.  Anyway there is a good solution, use this tool from trigemal
http://trigeminal.com/lang/1033/utility.asp?ItemID=11#11

FYI: I worked on one database where we reduced the size of the database by 40% by removing the indexes and the GUID fields.

These tips was provided to you by Garry Robinson - Software Consultant
Try out our popular Access shareware Graf-FX  @  http://www.vb123.com/explore

Published  1999-08

Now click on this button Next Tip to read the next tip

 

 

 

Our Tools and Resources

  • RSS & Newsletter Here
    Join our newsfeed or sign up for our informative newsletter on Office Automation, Access and VB topics
  • Get Good Help
    If you need help with a database, our Australian Professionals could be the answer

  • Smart Access is online 
    The best magazine written about Microsoft Access is now being transferred to the web. There are 400 articles written by a 100 authors in the collection. 

    Purchase Smart Access

  • The Workbench
    Find out who has your database open, start the correct version of Access, easy compacting and backups, change startup options, creation versions,  shutdown database

  • Read about the Toolbox
    Sample downloads, library resource kit and searchable help file comprising most of the information at vb123.com.au plus hidden downloads etc. Includes one of Smart Access downloads.

  • Convert Access to SQL Server  
    Upsize to SQL Server 2005 or 2008, easily repeated conversions, highly accurate SQL query  translation and web form conversion.
  • Purchase the Popular FMS Products  
    If you purchase the Popular FMS products from us, you will receive a complimentary of Smart Access Gold, Silver or Bronze Collections [Your choice]

 

 

vb123 Professionals


Get Good Help Here

If you need help with a database or Office programming, our Professionals could be the answer because we have worked on many similar solutions



Frontpage Conversions
We have converted vb123.com to Expression Web, contact us if we can help you move to the latest Microsoft web tool.


About The Editor ~ Contact Us
Garry Robinson writes for a number of popular computer magazines, is now a book author and has worked on 100+ Access databases. He is based in Sydney, Australia

Access 2003 Security

MS Access Security

Read More here