dbTalk Databases Forums  

Index question...

comp.database.ms-access comp.database.ms-access


Discuss Index question... in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matthew Wells
 
Posts: n/a

Default Index question... - 04-01-2004 , 11:42 AM






I have a one to many relationship between two tables. The "one" table has a
5 field PK (total 7 fields, 1400 records) and the "many" table has a 7
field PK (total 15 fields, 1500 records). I followed the general rule of
indexing each field in the PKs in both tables. I was doing a query on both
tables with a "group by" to get the sum of a field in the "many" table. The
query was taking about 5 seconds to run which I thought was horrendous. I
deleted the individual indexes on the PK fields of the "many" table and that
made the query instantaneous. My question is: When creating a PK, does
that automatically index the individual fields? If so, then does my
re-indexing them slow things down?

Thanks.

Matthew Wells
MWells (AT) NumberCruncher (DOT) com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.