how do ms access indexes work

Just what to how what method does Access use to retrieve records. That is, read entire index first then retrieve related records.  And how

Thanks
danlopez007Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
It's complicated.   JET has a number of options depending on the types of indexes, fields involved, etc.

In general, it uses indexes when it can, which are ISAM indexes.   It uses some (but not all) of the Rushmore optimizations from Visual Fox Pro.  Indexes may be intersected, Unioned, or counted and compared.  When performing joins between tables, there are five different join strategies that can be used.

 Resorting to a scan of the table (reading the data records) is always a last resort (and not always the case as some believe).

To see the costing plan that JET/ACE uses, you need to turn on JETSHOW plan.   With SHOWPLAN on, a text output file will be created when JET executes a query.   It will not revel the costing plan of any nested or sub queries.

Jim.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
magarityCommented:
In general, the answer to your part about reading the entire index, the answer is usually no.  any query that causes the system to read every index entry would then read every table entry and that would be inefficient.  if it cannot efficiently seek down to a few entries in the index relative to the table, it will usually just skip the index and go read the whole table.

Edited by JDettman - Link policy.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Further ....

Note that indexes can be a double edge sword. Whereas they will (usually) most definitely speed up searches and filtering - almost like magic sometimes,  each time you add or delete a record, all indexes in the table have to be updated by Jet. So, if you have several hundred thousand records, then the updating time could be significant, depending on various aspects of your system and/or network connection is there is one, etc.

Indexing can be somewhat of an art form.  The bottom line is be judicious in your use of indexes. Don't just randomly index fields for no reason. In addition, test the effectiveness of your indexes on test (or live) datasets that represent the amount of data you expect to encounter ... and see for yourself how they affect performance, good or bad.

mx
0
clarkscottCommented:
What is the reason for your question?
Are you searching for a way to speed up your queries?

Typically, we don't worry too much about how the index works.  We just know the "good rules" to apply (don't index on everything, use numbers for primary keys and such, avoid index of long text fields, etc.)

Scott C
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.