MS Index Questions
Posted on 2013-12-09
Is there any way that I can determine what fields should be indexed in a specific table, or group of tables, without crawling through the code and analyzing all the queries?
I am specifically concerned with a group of 201 tables that I use to store customer inventory. The tables have names like 0000,0001,0002...0200, and each table, with the identical structure, has about 125 fields.
This table naming convention that I've used, allows me to programmatically create queries and recordsources based upon a specific customers inventory (for example, table , so I can not simply search my code for a specific table name as you would normally do to find all the SQL statements in our code that reference a specific table (this code has matured for more than 10 years, so the variable names used in the code varies depending upon the routine.)
I'm sure there are at least 200 queries and RecordSource statements embedded in my code.
In addition, I likely have a hundred or more queries, that use this data.
Is there any way to determine which fields should be indexed, without crawling through the code and examining every SQL statement and query?
Some of the tables have a hundred thousand records, so performance is a critical concern.
In other words, my code may use a variable to represent the table name.