Hi,
I'm a new comer with some questions about basic conceptions of MonetDB.
1. The executor
I've ever found the executor of postgreSQL at src\backend\executor,
but cannot make sure where it is like that in MonetDB src.
MonetDB\MonetDB\src\gdk or MonetDB5-server\MonetDB5\src\mal ?
3. MAL
MAL (MonetDB Assembly Language) is a script tool only for MonetDB or
a common script language that can be applied to other softwares.
Why it is a must in MonetDB ?
4. .mx files
In MonetDB, .mx files are compiled to make .h and .c files generated.(in
this way ?)
Why is this routines ? (not just coding in .h and .c files directly)
Yel
----
Best Regards
richardroky(a)gmail.com
Hi,
I'm currently writing my bachelor's thesis at the university of
Konstanz about extending BaseX [1] with XQuery Update. I wanted to
compare evaluation times between MonetDB and BaseX, as they have
comparable table layouts, but am facing several problems.
So far I read your manual that suggests to use functions to support
caching, as well as limiting inserts to a single position in a
document. Some papers provided insight too [2,3], still there are
questions (hopefully I didn't miss anything on your mailing lists and
I hit the right one):
1. General storage:
In which way is free space reserved, if an updatable document via
fn:add-doc(u, x, y, freeSpace) is added? Let's assume freeSpace = 10%.
Does this mean that free space (equal to 10% of our document size) is
allocated between all used pages on disk? Spoken clearly, one tenth of
free space on every page? But this would be in conflict with the
suggestion to limit inserts to a single position in a document...
2. Timing:
What happens during the 'Print'...ing part when I use the '-t' flag
for timings? Query time is amazingly fast, yet I experience unusually
long printing times - even for a small test document. Increasing the
free space variable (see question 1) results in even longer printing
times, which is on one side perfectly understandable as more pages on
disk are used (right?)...
3. Yet, on the other side empty space on disk should not be accessed?
I expect there to be a balance between query performance and free
space? Is there a rule of thumb I can apply to get the most out of
MonetDB (regarding specific queries of course)?
4. Are there any general advises for testing update performance of
MonetDB?
I could gain some knowledge from a previous post on the developers
list - yet I feel it's not enough to explain the results of my (yet
immature) tests and to do your system justice ...
Thanks for your help! Looking forward to your answer...
Best regards,
Lukas
[1] www.basex.org
[2] Updating the Pre/Post Plane in MonetDB/XQuery
[3] MonetDB/XQuery: A Fast XQuery Processor Powered by a Relational
Engine
Dear all,
Recently, I am learning the MonetDB,I know that a MAL instrction is corresponding to a C-function. such as a MAL instrction algebra.select() is corresponding to ALGselectInclusive(); and the corresponding file is algebra.mal, for example,
command select(b:bat[:any_1,:any_2], low:any_2,
high:any_2, li:bit, hi:bit) :bat[:any_1,:any_2]
address ALGselectInclusive
comment "Select all BUNs that have tail values: {v| low <{=} v <{=} high}.
Boundary inclusion is indicated separately.
NIL boundary values have a special meaning.
+ low == nil means: no lower bound
+ high == nil means: no upper bound.";
My question is ,in MonetDB souces code, how to corresponding the MAL to the C-function, how to implement it ? and how to transfer the parameter from MAL to C-function?
Best regards!
dear all
recently,I want to run mapi examples from
/Monetdb-client/clients/src/examples/C/, it contains sample0.c ,sample1.c
and so on. I read the Application Programming Interfaces of the Monetdb
manual, and I use: gcc sample0.c 'monetdb-clients-config --cflags --lib'
-lMapi -o sample0 to complie it,but it has errors, so I want to ask how I
will complie the files?
Best regards!
Dear all,
I use MAL interface to manipulate the BAT data, I use sql.bind(,,0) to get a
BAT, and use io.print() to print the BAT content, but when I use bat.insert
to insert one bun to the bat,but after the bat.insert(), I run io.print() to
print the BAT,but the bat content is not changed,I use sql.bind(,,,,1) to
get the insert BAT of the orinal bat, but it is null. I think it it about
commit() ?? how I commit it ? do I think right?
Best regards!
Dear all,
Recently,I am using MAL,using mclient -l mal command, If I use sql, I
write a SQL: select * from t1; while t1 has two column c1 and c2,type is
int. I want to ask what the corresponding MAL of this sql, if I us mclient
-l mal ,what mal will I will use to implement the select * from t1
Best regards!
Dear all,
My test application want to implement two application interface over
MonetDB , one is loading *.csv file to MonetDB, to implement this interface
,I use MonetDB's JDBC and "copy from" command to implement it. and another
interface is select from one bat using select conditions, such as this C
function: bat *selectfrombat(char * batname,char * select condition), how do
I implement it?do MonetDB has something like "copy from " command,and so I
will use jdbc and the command to implement it? or other method to implement
it?
I know one MAL instruction is algebra.uselect, and corresponding C
function, do I just use the C function or alter the C fuction?
Best regards,
dear all,
Recently when I am reading MAL optimizer manual of MonetDB.and don't
know the Merge Table optimizer,A merge association table (MAT). (1)How it
perform optimize the MAL?
(2) for this example,
before optimize,
m0:= bat.new(:oid,:int);
m1:= bat.new(:oid,:int);
m2:= bat.new(:oid,:int);
b := mat.new(m0,m1,m2);
s := algebra.select(b,1,3);
i := aggr.count(s);
io.print(s);
io.print(i);
c0 := bat.new(:int,:int);
c1 := bat.new(:int,:int);
c := mat.new(c0,c1);
j := algebra.join(b,c);
io.print(j);
The selection and aggregate operations can simply be rewritten using a MAT:
_33 := algebra.select(m0,1,3);
_34 := algebra.select(m1,1,3);
_35 := algebra.select(m2,1,3);
s := mat.new(_33,_34,_35);
i := 0:int;
_36 := aggr.count(_33);
i := calc.+(i,_36);
Chapter 5: The MAL Optimizer 90
_37 := aggr.count(_34);
i := calc.+(i,_37);
_38 := aggr.count(_35);
i := calc.+(i,_38);
io.print(i);
It seems that mat is very same with the bat.kunion, but what different
between them, and how it optimizer the MAL?
Best regards!
Dear everyone,
Recently,I am intersting in MAL optimize,and have read the manual of the
MAL optimize, but it is so long, Possible if we want to use mal optimize ,we
must degignation the optimize consideration, such as alias removal,
constant expression,join path optimizer;And then I dedug the MonetDB,but
default it don't use any optimize.so what do you think about the mal
optimize?
Best regards.