SELECT failure: "insufficient space for HEAP ..."

Clarkson, Edward C. Edward.Clarkson at gtri.gatech.edu
Tue May 13 00:45:54 CEST 2014


Hi,

We have an application (http://tmt.gtri.gatech.edu/lytic.html) based on a
relatively modest, single (~1-10M row, ~20 column) MonetDB table (Win7, 64
bit, Jan14-SP1 server release, quad-core, 8GB RAM) and have been
encountering sporadic SELECT query failures with the error: "Insufficient
space for HEAP of 1017856 bytes".  Since I've been trying in earnest to
diagnose this, that byte value has been consistent, FWIW.

The failures are frustratingly intermittent; if I rerun a failing query
(by hand, using mclient) it sometimes fails again, and sometimes works
correctly.  I've been unable to figure out any sort of pattern.

Unfortunately, I can't post the exact table and query, but the general
form of the queries (which have ~5-10 case clauses) are:

SELECT 
CASE 
  WHEN Foo = 'ValueA' and Bar LIKE 'ValueB%' THEN 100*(Baz-1234)/1234
  WHEN Foo = 'ValueC' and Bar LIKE 'ValueD%' THEN 100*(Baz-3456)/3456
  ...
END
FROM table
WHERE
  <same case statement as above> IS NOT NULL
LIMIT 1

Any ideas what I might do to narrow this down or other information I might
provide?  I captured an explain of a failing query--it's many hundreds
(1000s?) of lines, so I didn't want to include it here in full.  All
suggestions appreciated.  Thanks,

Ed

P.S.  MonetDB has been a fantastic complement to our application, thanks
to everyone involved!



More information about the users-list mailing list