M
Matt
Hi All,
I am creating a new database and am very familiar with the concept of
indexing and its benefits, but I had some questions on which fields to
index.
Is there a general guideling or set of circumstances other than the
following that should determine if a field is indexed:
-The field is a primary key
-The field is a foriegn key
-The field will be part of a where clause
For instance, I the following table is part of the database:
tblProductivity
----------------------------------------------------------------------------------
PRODUCTIVITY_PK: autonumber; Primary Key; indexed
PRODUCTIVE_DATE: date/time(mm/dd/yyyy);indexed
AWD_USER_GROUP: text
USER_ID_FK: text, indexed
TEAM_FK: Number; indexed
SUB_TEAM_1_FK: Number; indexed
UNIT_FK: Number; indexed
CATEGORY_FK: Number; indexed
WORKTYPE: Text;
STATUS: Text;
COUNT: Number
ELAPSED_TIME: double
AWD_WORK: Yes/No; Indexed
I have indexed all of the foriegn keys and the date (the dats is used
in many joins and quite often in where clauses).
The WORKTYPE and STATUS are also used in quite a few where clauses,
and sometimes in joins.
Should I index them?
Does indexing too many fields in one table reduce its effectiveness?
Any other information is greatly appreciated!
As always, Thanks in advance.
I am creating a new database and am very familiar with the concept of
indexing and its benefits, but I had some questions on which fields to
index.
Is there a general guideling or set of circumstances other than the
following that should determine if a field is indexed:
-The field is a primary key
-The field is a foriegn key
-The field will be part of a where clause
For instance, I the following table is part of the database:
tblProductivity
----------------------------------------------------------------------------------
PRODUCTIVITY_PK: autonumber; Primary Key; indexed
PRODUCTIVE_DATE: date/time(mm/dd/yyyy);indexed
AWD_USER_GROUP: text
USER_ID_FK: text, indexed
TEAM_FK: Number; indexed
SUB_TEAM_1_FK: Number; indexed
UNIT_FK: Number; indexed
CATEGORY_FK: Number; indexed
WORKTYPE: Text;
STATUS: Text;
COUNT: Number
ELAPSED_TIME: double
AWD_WORK: Yes/No; Indexed
I have indexed all of the foriegn keys and the date (the dats is used
in many joins and quite often in where clauses).
The WORKTYPE and STATUS are also used in quite a few where clauses,
and sometimes in joins.
Should I index them?
Does indexing too many fields in one table reduce its effectiveness?
Any other information is greatly appreciated!
As always, Thanks in advance.