Improve insert performance, better temp table definition, drop temp table if it already exists