#208 debug create temp table and transactions
#209 add variable to control table empty algorithm