I'm having some trouble running queries on a gargantuan Oracle DB.
Squirrel was repeatedly running out or memory and closing all result
tabs. I made progressively smaller queries till I could get them to
complete. I was noticing that Squirrel was using 3-6GB or ram, yet the
exported files were only 200-500 MB. I'm trying to figure out why
Squirrel is using at least 12-15 times as much ram as the final CSV
export of the data. I understand there's overhead, but an order of
magnitude larger is excessive.
Any ideas to curb this excessive memory usage?
Within the data, there are several columns containing nvarchar with a
max length of 4000. Very few records will actually use more then 250
chars of that 4000 max size. I was thinking maybe the JDBC is allocating
the full 4000 time 2bytes per char so 8kB for each of those columns on
every record. If that's the case; it would definitely explain the
excessive memory usage. Is there a way to check on this theory or get
around it?
|