Index usage in Live Datamart queries

Index usage in Live Datamart queries

book

Article ID: KB0074541

calendar_today

Updated On:

Products Versions
TIBCO Live Datamart 7.x and later

Description

How can I know if an index is being used for given query issued to a Live Datamart table?

Issue/Introduction

Detailed information on how indexed fields are used by Live Datamart

Resolution

LiveView has a several levels of query optimization. The ExtractIndicesOperator planning is only for the simple predicate portion, and only for the continuous portion of the query. For example..
live select * from ItemsSales where quantityRemaining>200
In the above query, the ExtractIndicesOperator planning would be used if the field 'quantityRemaining' has been added as an index.

A WHEN temporal clause is not part of the ExtractIndicesOperator planning - in fact since the WHEN element is a simple field the only planning is to determine if there's an index available for that field or not. An example of using the WHEN temporal clause is..
live select * from ItemsSales when transactionTime between (now()-seconds(1)) and (now())
The WHEN field index is not positively identified in the logs as being used, but only negatively identified in the logs as being absent.  For example:

2020-06-10 16:35:24.279 WARN  ExtractIndicesOperator - Minimal: Inefficient time-window query : TimeField (transactionTime) should be indexed

This log message will occur when an un-indexed WHEN predicate is used. Having an index available for the WHEN field is crucial if your table is large.