add index on type column