Newer Version Available
Limit the Use of unique()
unique() can affect query performance for large
datasets that have over 100 million rows and include more than one million unique values. For
large datasets, unique() is faster for measures than for
dimensions. If counting the number of unique string values causes performance issues, convert
the string to a number. For example, use a hash of the string value or refer to the index of
the string in a sorted list of string values.