I have a column with a count distinct of about 12million. This is an integer
field (for e.g. call it account with just numbers in it).
This is account drives a lot of reports where the user enters the account in
a search box on tableau and then tableau sends a query like: 

SELECT account  ,
  SUM(earnings)  
FROM sales 
WHERE (POSITION('538807' IN LOWER(account)) > 0)
GROUP BY 1
;

This search is slow. It takes about 15 to 30 seconds or more. 

The same when implemented on a column with defined as varchar is rather
fast.

Can you please help understand what is going on?

thanks in advance!!!!

--
Sent from: http://apache-kylin.74782.x6.nabble.com/

Reply via email to