Hi, 

Today, we encountered this serious memory issue with MonetDB. 

Data : 10 tables - each with ~600 columns - all tables are EMPTY (No rows).
 
Query : One query that involves with 25 joins across all the 10 tables. 

MonetDB version : July2015-SP3

The above query is ran on the same MonetDB version with the same table structure with all tables empty on two different machines as follows. 

Scenario 1 - Query ran on Macbook Pro 
The query is ran. 
Expected result - return an empty set in a few seconds. 
Actual result - returns an empty set in ~5 minutes
RAM - 8 GB utilised completely. 
Swap space used from disk - 10 GB
This swap space is cleared after sometime automatically (around 5 mins) 

Scenario 2 - With a CentOS virtual machine
The query is ran. 
Expected result - return an empty set in a few seconds. 
Actual result - the query rebooted this high end CentOS machine. 
RAM - 128 GB utilised completely. 
After reboot, the swap memory was freed. 

I am puzzled with the following questions. 
  1. Why should a query that runs on 10 EMPTY tables require memory in GBs? 
  2. How did this query manage to run on a Mac with just 8 GB RAM, but crashed a machine with 128 GB RAM?
Is this a known memory leak issue? 

Any help much appreciated. Thanks in advance. 


Regards,
Vijay.