Not sure what effect it will have, but I believe the only way to really free memory in Python is to use something like this:
rows = db(...).select(...) del rows This won't immediately free the memory, but might make it free faster than dereferencing it. Alternatively, you can call gc.collect() to force dereferenced objects to be freed, but this is generally bad practice. There are only a few cases where you should actually use this, and your *might* be one. So try del or gc.collect() and see if that helps any. Just keep in mind that Python (or any managed memory language) makes it very difficult to manage memory manually.

