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

Teradata Vantage™ - SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Programming Reference
Publication ID
B035-1210-171K
Language
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