Hi, when I run the following query (complete testcase given), the server throws an exception !MALException:bbp.project:Can not create object !ERROR: HEAPalloc: Insufficient space for HEAP of 91226112 bytes. The result should be 11390625 (15^6) rows. The corresponding count query succesfully delivers this value. The amount of used memory of the mserver5.exe process is about 1.2GB at the time of failure. The testcase is: create table d (id integer, ordinal integer, value varchar(50)); insert into d (id, ordinal, value) values (1,1,'a'), (2,2,'b'), (3,3,'c'), (4,4,'d'), (5,5,'e'), (6,6,'f'), (7,7,'g'), (8,8,'h'), (9,9,'i'), (10,10,'j'), (11,11,'k'), (12,12,'l'), (13,13,'m'), (14,14,'n'), (15,15,'o'); create table M_189 (d1 integer, d11 integer, d19 integer, d4 integer, d6 integer, d8 integer, value double); SELECT G.M_ID, G.VALUE, G.d1, G.d11, G.d19, G.d4, G.d6, G.d8 FROM (SELECT DISTINCT 189 AS M_ID, 1 AS M_ORDINAL, M_189.VALUE AS VALUE, D1.ID AS d1, D11.ID AS d11, D19.ID AS d19, D4.ID AS d4, D6.ID AS d6, D8.ID AS d8 FROM D D11 CROSS JOIN D D1 CROSS JOIN D D4 CROSS JOIN D D6 CROSS JOIN D D8 CROSS JOIN D D19 LEFT OUTER JOIN M_189 ON M_189.d1=D1.ID AND M_189.d11=D11.ID AND M_189.d19=D19.ID AND M_189.d4=D4.ID AND M_189.d6=D6.ID AND M_189.d8=D8.ID ) G JOIN D D11 ON D11.ID=G.d11 JOIN D D6 ON D6.ID=G.d6 JOIN D D8 ON D8.ID=G.d8 JOIN D D19 ON D19.ID=G.d19 JOIN D D1 ON D1.ID=G.d1 JOIN D D4 ON D4.ID=G.d4 ORDER BY G.M_ORDINAL, D11.ORDINAL, D6.ORDINAL, D8.ORDINAL, D19.ORDINAL, D1.ORDINAL, D4.ORDINAL; Kind regards, TB