create index with different datatype

Database

create index with different datatype

Hi,

Can we create index on table with different data type for column in base table?

If table has a column as varchar and data stored there is compatible with integer data type. Can we somehow tell optimizer that this data is integer and plan accordingly. Purpose is nto to change dataype in base table.

Thanks

2 REPLIES
Teradata Employee

Re: create index with different datatype

You cannot do that.

You can tell optimizer in a way of creating a temporary table with a different index(prefered datatype)

or by creating a join index.

So if the join index is used it takes new datatype

-Aravind

Re: create index with different datatype

Thanks Aravind