Cachè Monitor provides a visual display of an execution plan for SQL Queries. With this information it is more easily to tune SQL Statements.
An SQL statement expresses what you want but does not tell Caché how to do it. It will decide the best way to compute the results. InterSystems Caché chooses whether it is better to read completely the table/globals, or whether using an index would be faster. It compares the cost of all possible approaches. The way that a statement can be physically executed is called an execution plan or a query plan. Caché Monitor`s Query Analyzer shows this execution plan in a tree like view:
Whenever an SQL Statement is executed, InterSystems Caché designs an execution plan for it. This execution plan is basically a step for step instruction for how the statement must be executed. That is, the order in which tables/globals are read, if indexes are used, which join methods are used to join tables and so on.
The execution plan for an sql statement can be viewed through selecting the Execution Plan – Tab. If you select this tab, the execution plan will be calculated and displayed. Consider please that only ONE SQL Statement is selected!
If you select an index node in the execution plan (query tree), you see information about existing indexes on the used tables. Additionally the calculated and current used selectivity is available.