Compound Indices

J

JimS

If I create a compound index on a table with, say, 2 columns in the index,
then join it to another table using both columns, will Access automatically
use the index, or is there some other way I should do that?
 
M

MGFoster

JimS said:
If I create a compound index on a table with, say, 2 columns in the index,
then join it to another table using both columns, will Access automatically
use the index, or is there some other way I should do that?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes. In most RDBMS the first column in the index is usually used as the
main search part of the index. The second column is a "secondary"
index. So make sure the first column is something you'll use a lot - as
JOIN columns or criteria columns.

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSk40OYechKqOuFEgEQJEPACg7MFclp40F4MahJqbJJKzMZwGOFUAnihS
1nmKZMppWLEN+vYdzt0LtEMa
=hrD8
-----END PGP SIGNATURE-----
 
J

Jerry Whittle

To really know if Access uses an index, Google "access showplan". It tells
you how queries are actually run. Always us the results from the second time
a query is run after being created or modified.
 

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