Hello Sir, I have some problem in MAL execution. *setp 1:* I have open [mclient -d test1] and {explain select sum(v1) from demo;} it show following result. swapnil@swapnil-lp:~$ mclient test1 Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2012-SP1) Database: MonetDB v11.11.7 (Jul2012-SP1), 'mapi:monetdb://swapnil-lp:50000/test1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>explain select sum(v1) from demo; +-------------------------------------------------------------------------------+ | mal | +===============================================================================+ | function user.s1_1{autoCommit=true}():void; | | X_13:lng := nil:lng; | | barrier X_141 := language.dataflow(); | | X_2 := sql.mvc(); | | X_35:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,0,8); | | X_71 := algebra.selectNotNil(X_35); | | X_60:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,0,8); | | X_83 := algebra.kdifference(X_71,X_60); | | X_95 := algebra.selectNotNil(X_60); | | X_104 := algebra.kunion(X_83,X_95); | | X_11:bat[:oid,:oid] := sql.bind_dbat(X_2,"sys","demo",1); | | X_12 := bat.reverse(X_11); | | X_117 := algebra.kdifference(X_104,X_12); | | X_131 := aggr.sum(X_117); | | X_39:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,1,8); | | X_73 := algebra.selectNotNil(X_39); | | X_62:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,1,8); | | X_84 := algebra.kdifference(X_73,X_62); | | X_97 := algebra.selectNotNil(X_62); | | X_106 := algebra.kunion(X_84,X_97); | | X_118 := algebra.kdifference(X_106,X_12); | | X_132 := aggr.sum(X_118); | | X_42:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,2,8); | | X_75 := algebra.selectNotNil(X_42); | | X_63:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,2,8); | | X_85 := algebra.kdifference(X_75,X_63); | | X_98 := algebra.selectNotNil(X_63); | | X_108 := algebra.kunion(X_85,X_98); | | X_119 := algebra.kdifference(X_108,X_12); | | X_133 := aggr.sum(X_119); | | X_45:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,3,8); | | X_77 := algebra.selectNotNil(X_45); | | X_64:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,3,8); | | X_86 := algebra.kdifference(X_77,X_64); | | X_99 := algebra.selectNotNil(X_64); | | X_110 := algebra.kunion(X_86,X_99); | | X_120 := algebra.kdifference(X_110,X_12); | | X_134 := aggr.sum(X_120); | | X_48:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,4,8); | | X_78 := algebra.selectNotNil(X_48); | | X_65:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,4,8); | | X_87 := algebra.kdifference(X_78,X_65); | | X_100 := algebra.selectNotNil(X_65); | | X_112 := algebra.kunion(X_87,X_100); | | X_121 := algebra.kdifference(X_112,X_12); | | X_135 := aggr.sum(X_121); | | X_51:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,5,8); | | X_80 := algebra.selectNotNil(X_51); | | X_66:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,5,8); | | X_89 := algebra.kdifference(X_80,X_66); | | X_101 := algebra.selectNotNil(X_66); | | X_113 := algebra.kunion(X_89,X_101); | | X_123 := algebra.kdifference(X_113,X_12); | | X_136 := aggr.sum(X_123); | | X_54:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,6,8); | | X_81 := algebra.selectNotNil(X_54); | | X_68:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,6,8); | | X_91 := algebra.kdifference(X_81,X_68); | | X_102 := algebra.selectNotNil(X_68); | | X_114 := algebra.kunion(X_91,X_102); | | X_125 := algebra.kdifference(X_114,X_12); | | X_137 := aggr.sum(X_125); | | X_58:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,7,8); | | X_82 := algebra.selectNotNil(X_58); | | X_70:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,7,8); | | X_93 := algebra.kdifference(X_82,X_70); | | X_103 := algebra.selectNotNil(X_70); | | X_115 := algebra.kunion(X_93,X_103); | | X_127 := algebra.kdifference(X_115,X_12); | | X_138 := aggr.sum(X_127); | | X_8:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",1); | | X_10 := algebra.selectNotNil(X_8); | | X_129 := algebra.kdifference(X_10,X_12); | | X_139 := aggr.sum(X_129); | | X_130 := mat.pack(X_131,X_132,X_133,X_134,X_135,X_136,X_137,X_138,X_139); | | X_140 := algebra.selectNotNil(X_130); | | X_13:lng := aggr.sum(X_140); | | exit X_141; | | sql.exportValue(1,"sys.demo","L1","bigint",32,0,6,X_13,""); | | end s1_1; | +-------------------------------------------------------------------------------+ 80 tuples (2.845ms) *Setp 2:* I have copy same mal program on another teminal [mclient -lmsql -dtest1] swapnil@swapnil-lp:~$ mclient -lmsql -dtest1 Welcome to mclient, the MonetDB interactive terminal (Jul2012-SP1) Type \q to quit, \? for a list of available commands msql>function user.s1_1{autoCommit=true}():void; msql> X_13:lng := nil:lng; msql> barrier X_141 := language.dataflow(); msql> X_2 := sql.mvc(); msql> X_35:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,0,8); msql> X_71 := algebra.selectNotNil(X_35); msql> X_60:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,0,8); msql> X_83 := algebra.kdifference(X_71,X_60); msql> X_95 := algebra.selectNotNil(X_60); msql> X_104 := algebra.kunion(X_83,X_95); msql> X_11:bat[:oid,:oid] := sql.bind_dbat(X_2,"sys","demo",1); msql> X_12 := bat.reverse(X_11); msql> X_117 := algebra.kdifference(X_104,X_12); msql> X_131 := aggr.sum(X_117); msql> X_39:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,1,8); msql> X_73 := algebra.selectNotNil(X_39); msql> X_62:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,1,8); msql> X_84 := algebra.kdifference(X_73,X_62); msql> X_97 := algebra.selectNotNil(X_62); msql> X_106 := algebra.kunion(X_84,X_97); msql> X_118 := algebra.kdifference(X_106,X_12); msql> X_132 := aggr.sum(X_118); msql> X_42:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,2,8); msql> X_75 := algebra.selectNotNil(X_42); msql> X_63:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,2,8); msql> X_85 := algebra.kdifference(X_75,X_63); msql> X_98 := algebra.selectNotNil(X_63); msql> X_108 := algebra.kunion(X_85,X_98); msql> X_119 := algebra.kdifference(X_108,X_12); msql> X_133 := aggr.sum(X_119); msql> X_45:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,3,8); msql> X_77 := algebra.selectNotNil(X_45); msql> X_64:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,3,8); msql> X_86 := algebra.kdifference(X_77,X_64); msql> X_99 := algebra.selectNotNil(X_64); msql> X_110 := algebra.kunion(X_86,X_99); msql> X_120 := algebra.kdifference(X_110,X_12); msql> X_134 := aggr.sum(X_120); msql> X_48:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,4,8); msql> X_78 := algebra.selectNotNil(X_48); msql> X_65:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,4,8); msql> X_87 := algebra.kdifference(X_78,X_65); msql> X_100 := algebra.selectNotNil(X_65); msql> X_112 := algebra.kunion(X_87,X_100); msql> X_121 := algebra.kdifference(X_112,X_12); msql> X_135 := aggr.sum(X_121); msql> X_51:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,5,8); msql> X_80 := algebra.selectNotNil(X_51); msql> X_66:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,5,8); msql> X_89 := algebra.kdifference(X_80,X_66); msql> X_101 := algebra.selectNotNil(X_66); msql> X_113 := algebra.kunion(X_89,X_101); msql> X_123 := algebra.kdifference(X_113,X_12); msql> X_136 := aggr.sum(X_123); msql> X_54:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,6,8); msql> X_81 := algebra.selectNotNil(X_54); msql> X_68:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,6,8); msql> X_91 := algebra.kdifference(X_81,X_68); msql> X_102 := algebra.selectNotNil(X_68); msql> X_114 := algebra.kunion(X_91,X_102); msql> X_125 := algebra.kdifference(X_114,X_12); msql> X_137 := aggr.sum(X_125); msql> X_58:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",0,7,8); msql> X_82 := algebra.selectNotNil(X_58); msql> X_70:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",2,7,8); msql> X_93 := algebra.kdifference(X_82,X_70); msql> X_103 := algebra.selectNotNil(X_70); msql> X_115 := algebra.kunion(X_93,X_103); msql> X_127 := algebra.kdifference(X_115,X_12); msql> X_138 := aggr.sum(X_127); msql> X_8:bat[:oid,:int] := sql.bind(X_2,"sys","demo","v1",1); msql> X_10 := algebra.selectNotNil(X_8); msql> X_129 := algebra.kdifference(X_10,X_12); msql> X_139 := aggr.sum(X_129); msql> X_130 := mat.pack(X_131,X_132,X_133,X_134,X_135,X_136,X_137,X_138,X_139); msql> X_140 := algebra.selectNotNil(X_130); msql> X_13:lng := aggr.sum(X_140); msql> exit X_141; msql> sql.exportValue(1,"sys.demo","L1","bigint",32,0,6,X_13,""); msql> end s1_1; MAPI = (monetdb) /tmp/.s.monetdb.50000 QUERY = end s1_1; ERROR = !TypeException:user.s1_1[76]:'aggr.sum' undefined in: X_13:lng := aggr.sum(X_140:bat[:oid,:dbl]) msql>user.s1_1 MAPI = (monetdb) /tmp/.s.monetdb.50000 QUERY = user.s1_1 ERROR = !SyntaxException:parseError: !'(' expected msql>user.s1_1(); MAPI = (monetdb) /tmp/.s.monetdb.50000 QUERY = user.s1_1(); ERROR = !TypeException:user.main[1]:'user.s1_1' undefined in: _1:void := user.s1_1() msql> It gives such error what is reason of giving such error by monetdb. i am really very frustrate what is reasone and how will i execute mal program. please help me !!!!!!!!!!!!! :) and another question is is Monetdb maintain any cache for storing result of SQL statment. -- Regards, Swapnil K. Joshi -- Regards, Swapnil K. Joshi _______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list