Non saprei.
Hai provato senza tabelle temporanee semplicemente creandoti una nuova tabella con la stessa struttura di quella che hai già?