[CORE] Add temporary table resized if needed
[CORE] Fix memory issue