Rename matrix_sum to __matrix_mem_sum and use unique_string() to generate the
temp table name