-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of memory when invoking several times .hashes #9
Comments
It also seems to not work reliably as some invocations returned correctly {count(1) => 475} and others returned wrongly {}
|
BTW, you can see memory used by SQLite objects by printing |
Is this applicable even when it's 1 element? I had the "limit 1" clause....
Only when it decreased the error appeared. And what memory are we talking about? My system has 32GiB of memory. That value shown is not enough for getting an out of memory. There is also the issue that if i remove the "limit 1" clause, it becames unusable:
It is stuck here for at least 30 mins (until i ctrl-c). |
I suspect the 'out of memory' is a spurious error. The Results object is a one-time use object. You get the results, you pull them out, then you don't use the object again. I'll try to add some more checks to the object to prevent its reuse, but the fact remains that you just can't do that. Decide what you want out of it (value/hash/array/arrays/hashes), then call it one time to get the result, then don't access the result any more.
This says that you want a sequence of hashes, then you access the first one. The sequence then hangs around waiting for you to get the rest (doesn't matter if there is just one). If you just want a single hash, just call
hashes returns a sequence of hashes -- if you want just one, call
|
ok, got it. Any reason why invoking |
Building each hash is slow. First it retrieves the array, then pairs the values with keys to make the hashes. If performance is a concern, always use arrays. |
Hi,
I just got an error "Out of memory". The SQLite file is 368M.
Steps:
The text was updated successfully, but these errors were encountered: