Skip to Content
0
Jun 18, 2018 at 12:18 PM

Index on HANA VARCHAR column

338 Views

Hi All,

I have a range partition table with 4 billion records , one partition per month from 012017 to 012019 , i have a view which is performing really bad and what i see from explain plan is it is taking more time in join condition

JOIN CONDITION: (INNER) BCD.FLD_SQN = DMT.FLD_SQN, (INNER) CST.ST_SQN = FP.ST_SQN, (INNER) FP.CO_SQN = DI.CO_SQN, (INNER) BCD.JUNK_SQN = FP.JUNK_SQN

Digging more i see

(BCD.FUNC_CODE = n'GROSS') OR (BCD.FUNC_CODE = n'IC') OR (BCD.FUNC_CODE = n'SOLO') OR (BCD.FUNC_CODE = n'NETT') this return 23,911,300 rows

Func_code is a varchar column and it is having only 4 distinct values in that billion of rows ,

is it is good idea to create index on Func_code ?? if yes any specific index ?/

PS : The table does not have an primary key or another other index right now

Thanks