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

SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2023-04-27
dita:mapPath
fsi1592016213432.ditamap
dita:ditavalPath
fsi1592016213432.ditaval
dita:id
B035-1210
lifecycle
previous
Product Category
Teradata Vantage™

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