add index to temporary_table