Kbase C28395: Is there a way to determine which indexes are used by a query?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  27/04/2005 |
|
Status: Verified
GOAL:
Determine which indexes are used by a query
FACT(s) (Environment):
ObjectStore
OSJI
All Operating Systems
Category: C++ Collections
Category: Java Collections
FIX:
There are two ways to access this information.
1) A basic check can be made by setting the environment variable OS_QOPT_VERBOSE to 1. When this environmental variable is set then whenever a query is run, information about the indexes used is written to stderr See the Note below for a sample of the output.
2) There are three undocumented functions that can be used to determine the indexes used programmatically. They are:
os_collection::_set_record_index_use() tells the query sub-system to begin recording what indexes are being used in queries.
os_collection::_get_index_use_history() returns an os_list of all indexes used since the index use history was cleared. os_collection_clear_index_use_history() clear the record of all previous indexes.
For customers using OSJI, these methods are part of the OSJI peer classes.