12

I have a really large table need to calculate (10 billion + rows). It's too long to calculate all of them at one time. Therefore, I create a list of break points, and I calculate and store at the end of each step. However, each step costs longer time. I think the reason is the memory or cache, do you have any idea how to deal with in this situation or just how to clear cache or memory?

I reuse the variable for output in the loop, so the variable will not become bigger and bigger.

Thank you so much.

Carl Zheng
  • 708
  • 2
  • 6
  • 20

1 Answers1

6

I use to solve this issue using a line that reset the variable at the end of the process, cleaning the cache:

MyVariable = None
Camilo
  • 335
  • 5
  • 7