An Application for Testing Index Performance

You can create an application that systematically drops and rebuilds indexes using different columns and different orders and that measures and records the performance of each new index format by using a test-harness application (a set of simultaneous processes derived from a typical real-time system).

Before programming, you must identify the type and frequency of procedures requested by clients and create a representative sample of stored procedures. You can then write an application that adds and removes Index objects based on different permutations of a table's columns. You can identify the table's columns by iterating through the Columns collection. Then, the application can execute the representative sample of stored procedures using the ExecuteImmediate method and measure the execution time for each index. You can use this tool on many database systems to identify the combination of indexes that provides the best results.