16.20 - Example: Generating a Report on Feature Usage - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Operators and User-Defined Functions

Advanced SQL Engine
Teradata Database
Release Number
Release Date
April 2020
Content Type
Programming Reference
Publication ID
English (United States)

The following sample query generates a report on feature usage based on all the DBQLogTbl rows using the FeatureUsage bitmap.

select cast(b.FeatureName as char(50)) , sum(GetBit(a.FeatureUsage,(2047 - b.FeatureBitpos))) as FeatureuseCount from DBC.DbqLogTbl a, DBC.QryLogFeatureListV b group by b.FeatureName;

An example of a query return output:

FeatureName                                         FeatureuseCount
--------------------------------------------------  ---------------
Character Partition Primary Index                                 4
Multi Level Partition Primary Index                              52
Increased Partition Level Partition Primary Index                 1
Partition Primary Index                                          65