Hi,

Please find attached a query (and corresponding schema) that results in mserver5 using more than 1GB of memory and terminating after 6 mins with this output:

MAPI  = (monetdb) /tmp/.s.monetdb.50000
ACTION= read_line
QUERY = PLAN SELECT DISTINCT 
        h3.obj, 
        CASE 
        WHEN u_ENDPOINT.value IS NOT NULL THEN u_ENDPOINT.value 
        WHEN l_ENDPOINT.value IS NOT NULL THEN l_ENDPOINT.value 
        WHEN ll_ENDPOINT.value IS NOT NULL THEN ll_ENDPOINT.value 
        WHEN lu_ENDPOINT.value IS NOT NULL THEN lu_ENDPOINT.value 
        END, 
        NULL
        FROM 
        triples t0 
        INNER JOIN triples h1 ON (h1.pred = 21 AND h1.obj = 42 AND h1.subj = t0.subj) 
        INNER JOIN triples h2 ON (h2.pred = 5 AND h2.subj = t0.subj) 
        INNER JOIN triples h3 ON (h3.pred = 20 AND h3.subj = t0.s
ERROR = !Connection terminated


Is it a problem of optimizer?
Any guidelines to deal with it will be appreciated.

I also attached merovigian.log.


--
George Garbis