monetdbcolumnstoremonetdb-assembly-language

What do the statements in MonetDB query plan explanations mean?


I am trying to understand the query plan of MonetDB.

Is there a documentation anywhere where I can find what each instruction stays for? If not, can anybody tell me what are returning

sql.projectdelta(X_15,X_23,X_25,r1_30,X_27) 

and

 sql.subdelta(X_246,X_4,X_10,X_247,X_249), for example?

In my query I am sorting the result by two attributes (e.g., by A,B). Can you tell me why the second sort has more parameters than the first?

(X_29,r1_36,r2_36) := algebra.subsort(X_28,false,false); 
(X_33,r1_40,r2_40) := algebra.subsort(X_22,r1_36,r2_36,false,false);             

Is algebra.subsort returning (oid, columnType) pairs, or just oid?

Thank you!!


Solution

  • Understanding output of the explain SQL statement requires knowledge of the MonetDB Assembly-like Language (MAL).

    Concerning functions sql.projectdelta, sql.subdelta, and algebra.subsort, you'll find their signature and a (brief) description in the monetdb lib folder. Ex :

    Concerning the different number of parameters for algebra.subsort :

    MAL functions can be overloaded bassed on their return value. algebra.subsort can return 1, 2 or 3 values depending on what you're asking for. Checl algebra.mal for the different possibilities.