Distinct queries from DBQL

General covers Articles, Reference documentation, FAQs, Downloads and Blogs that do not belong to a specific subject area. General-purpose Articles about everything and anything

Distinct queries from DBQL

I know how to find the distinct queries, but lets say there are bunch of qureies which are same but differ in the parameters or differ in few filter/joins. As per my requirement , queries of such nature are duplicate and i need just one copy of them.


lets say i want to find top 2000 queries by impactcpu, i dont want queries of above characterstic should occupy my list and i need just one of them. Is there any way to find this with max accuracy ?




Teradata Employee

Re: Distinct queries from DBQL

This is not a task that is as easy as it sounds.

The best way to do this is to use Query Bandind, assuming each query with almost same filters share the same Query Band.


If you can't use this method, you'll have to do some fuzzy searching.

Try to compute a score for a QueryText (using soundex / phonex or something else) and group them accordlingly.

It won't be perfect but could be enough.