How to Find Missing Indexes in Your Database
What Is Indexing?
In database optimization, indexing creates a data structure that accelerates data retrieval.
An index is typically created on a column to speed up operations like joins, searches, filters, and sorting. Without an index, the database engine performs a ("full table scan"), which is resource-intensive and slow.
Indexes help the database quickly locate and access relevant data, significantly reducing query execution time and improving overall performance.
Benefits of Using Indexes
- Improved query performance: Indexes accelerate data retrieval when columns are used in
WHERE
,HAVING
, orGROUP BY
clauses. - Faster sorting: Indexes boost performance when the column is used in
ORDER BY
clause. - Optimized joins: Table joins run faster by quickly locating matching rows.
- Reduced disk I/O: Fewer data blocks are read, minimizing resource usage.
- Efficient aggregations: Functions like
COUNT
,SUM
, andAVG
perform faster when relevant columns are indexed.
How Visual Expert Helps
Visual Expert analyzes your database schema, application code, and the SQL queries used throughout.
It automatically:
- Identifies columns used in
WHERE
,GROUP BY
,HAVING
, orORDER BY
clauses. - Checks whether these columns are already indexed.
- Generates a list of missing indexes to help you optimize query performance.
How to Find Missing Indexes Using Visual Expert
Prerequisites
- Use Visual Expert 2025 (Desktop or Web client).
- Include index definitions (
CREATE INDEX ...
) in your VE project:- Via SQL files, or
- By connecting Visual Expert directly to your database.
Choose a Scanning Strategy
Depending on your needs, you can choose to check:
- The entire database
Best for small databases or when most indexes already exist. Otherwise, you may end up with a large result that is difficult to use. - A selection of tables
Recommended for checking certain parts of the data model or optimizing certain slow features. - A selection of code objects
Recommended for checking that new/modified code does not introduce SQLs that require new indexes. Also, for inspecting performance-critical features.
1. Check the Entire Database
- Open Visual Expert.
- Select [Tables] at the root of the tree view.
- In the navigation bar, click [Missing Indexes].
Columns requiring a new index are listed in a container hierarchy.

Optional - Verify a specific column:
- Select the column in the tree view.
- In the navigation bar, go to Cross-references → Impact Analysis (tree).
- The objects and queries referencing this column are listed.
- Select the objects or queries to view the exact references—some of them will belong to
WHERE
,GROUP BY
,HAVING
, orORDER BY
clauses.
Next Steps:
- Share the missing index list with your DBA.
- Once indexes are created, re-run the analysis to validate improvements.
- Repeat regularly to maintain optimal performance.

2. Check a Selection of Tables
Visual Expert will check if an index should be created for each table selected.
- Open Visual Expert.
- Search for the tables you want to analyze:
- Desktop Client: Go to the [Search] tab.
- Web Client: Open the [Search criteria] in the blue ribbon.
- Enter your criteria ["Component name" contains "cust"].
- In the field [Search into], select "tables".
- Click [Search].

- A new tab is created, with the tables matching your criteria.
- Select one or more tables (use Ctrl for multi-select).
- In the navigation bar, go to Code Review → Missing Indexes.
- Columns requiring a new index are listed in a container hierarchy.
If needed, you can double-check that a particular column requires an index:
- Select the column in the tree view.
- In the navigation bar, go to Cross-references → Impact Analysis (tree).
- The objects and queries referencing this column are listed.
- Select the objects or queries to view the exact references—some of them will belong to
WHERE
,GROUP BY
,HAVING
, orORDER BY
clauses.
Follow-up:
- Pass the information to your DBA to create the missing indexes;
- Once created, they will no longer appear in the analysis
- Repeat regularly to keep your database optimized.

3. Check a Selection of Objects
Visual Expert will analyze the SQL queries embedded in the selected objects, and check if the columns referenced by these queries require a new index.
- Open Visual Expert.
- Search for the objects you want to analyze:
- Desktop Client: Go to the [Search] tab.
- Web Client: Open the [Search criteria] in the blue ribbon.
- Enter some search criteria, for instance "Component name" contains "cust".
- In the field [Search into], select the type of object required, for instance "Procedures".
- Click [Search].

- A new tab is created, with the objects matching your criteria.
- Select one or more objects (use Ctrl for multi-select).
- Go to Code Review → Missing Indexes.
- Visual Expert shows columns requiring a new index in a container hierarchy.
Optional - Verify a particular missing index:
- Select a column in the tree view.
- The code using this column is displayed in the source code view
- The exact reference is highlighted in the code for easy verification—this column may be used in
WHERE
,GROUP BY
,HAVING
, orORDER BY
clauses.
Next Steps:
- Pass the information to your DBA to create the missing indexes;
- Once created, they will no longer appear in the analysis
- Repeat regularly to keep your database optimized.
