[yunqa.de] Out of Memory

  • From: Dominique Devienne <ddevienne@xxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Tue, 17 Sep 2019 16:37:03 +0200

Hi,

Working while a large 26GB DB, I keep getting out of memory errors,
yet I have a big desktop with 128GB of RAM, and the SQLiteSpy.exe
only uses 250-300MB according to the Task Manager.

Help About says 1.9.12 Win32, so I thought maybe I downloaded the 32-bit
version, and I tried to get the latest Win64 version (now 1.9.13), but no,
Dependency Walker tells me it really is a 64 .exe.

For example, with the query below I get an out-of-memory error.
Yes, res.msg_json can be big (see below), but this query

select res.evt_id, res.id as res_id,
       length(res.msg_json) as "#json_bytes",
       json_array_length(res.msg_json, '$.resources') as "#resources"
  from response res
 where res.protocol_id = 3
   and res.msg_id = 4

returns quickly with out-of-memory error, and I briefly see SqliteSpy go up
to
750MB in the Task Manager before getting the error, again despite having
ample RAM.

This query:

select count(*), sum(length(res.msg_json))
  from response res
 where res.protocol_id = 3 -- i.e. Discovery(3)
   and res.msg_id = 4 -- i.e. GetResourcesResponse(4)

returns:

count(*)sum(length(res.msg_json))max(length(res.msg_json))
99 18198481551 282887748

i.e. only 99 rows, 18,198,481,551 bytes (so total of 18GB), and
282,887,748 (~ 282MB for largest JSON doc). The query that errors out above
is not extracting much memory, but it does need to parse all 99 large JSON
docs,
to get the array length, but it does one doc at a time, so I can't imagine
it takes that much memory, even for a 300'ish MB JSON file.

What am I missing here? What exactly are the memory limitations of
SQLiteSpy?
How can I make it use more of my 128GB of RAM???

Thanks, --DD

Other related posts: