Adding missing index to temporary table