G
Guest
Query Index Questions:
Suppose that I have two tables Y and Z. The following are the facts
concerning the tables:
Table Y has a primary key based upon fields A,B,C,D. There are over 3
million records in the table. Fields A, B, C, D are primary keys that lookup
into other tables such as vendor, product, Process Calculation Run, etc.
Table Z has a primary key upon fields B, C where B and C are the same fields
listed above. The table also has a field E, which is related to field B.
The table has 18,000 records.
Two questions regarding query performance purposes: Question One: what will
happen if I create a new query with table Y and Z, using a one to one join
between two corresponding fields B and C of the 2 tables? Will Microsoft
Access be able to take advantage of the primary key index in table Y and Z?
The second question is a little bit different. Table Y is the same as
above. Table Z has a primary key on fields C and B (the order of the fields
is correct), and still contains Field E (which is related to Field C). I
created a new/extra index in table Y together on the fields B and C (this is
the correct order), and create a similar index in table Z together on the
fields B and E(Notice E is different than field C). Suppose, now I create a
new query using tables Y and Z with the joins on the fields Y.B to Z.B and
Y.C to Z.E. I also have added a where clause on the field Z.E. Will
Microsoft Access be able to utilize the created indexes on the fields Y.B/C
and Z/B.E when executing the query?
Suppose that I have two tables Y and Z. The following are the facts
concerning the tables:
Table Y has a primary key based upon fields A,B,C,D. There are over 3
million records in the table. Fields A, B, C, D are primary keys that lookup
into other tables such as vendor, product, Process Calculation Run, etc.
Table Z has a primary key upon fields B, C where B and C are the same fields
listed above. The table also has a field E, which is related to field B.
The table has 18,000 records.
Two questions regarding query performance purposes: Question One: what will
happen if I create a new query with table Y and Z, using a one to one join
between two corresponding fields B and C of the 2 tables? Will Microsoft
Access be able to take advantage of the primary key index in table Y and Z?
The second question is a little bit different. Table Y is the same as
above. Table Z has a primary key on fields C and B (the order of the fields
is correct), and still contains Field E (which is related to Field C). I
created a new/extra index in table Y together on the fields B and C (this is
the correct order), and create a similar index in table Z together on the
fields B and E(Notice E is different than field C). Suppose, now I create a
new query using tables Y and Z with the joins on the fields Y.B to Z.B and
Y.C to Z.E. I also have added a where clause on the field Z.E. Will
Microsoft Access be able to utilize the created indexes on the fields Y.B/C
and Z/B.E when executing the query?