Changeset: 5d87d518eaaa for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5d87d518eaaa
Modified Files:
monetdb5/optimizer/opt_volcano.c
sql/backends/monet5/sql_optimizer.c
Branch: default
Log Message:
Tighten the memory requirement to 80% of available RAM
before switching to volcano pipe.
diffs (54 lines):
diff --git a/monetdb5/optimizer/opt_volcano.c b/monetdb5/optimizer/opt_volcano.c
--- a/monetdb5/optimizer/opt_volcano.c
+++ b/monetdb5/optimizer/opt_volcano.c
@@ -54,6 +54,14 @@ OPTvolcanoImplementation(Client cntxt, M
}
continue;
}
+ if( getModuleId(p) == groupRef ){
+ if( getFunctionId(p) == subgroupdoneRef ){
+ q= newStmt(mb, languageRef, blockRef);
+ q = pushArgument(mb,q,mvcvar);
+ q = pushArgument(mb,q,getArg(p,0));
+ mvcvar= getArg(q,0);
+ }
+ }
if( getModuleId(p) == sqlRef){
if ( getFunctionId(p) == bindRef ||
getFunctionId(p) == bindidxRef ||
diff --git a/sql/backends/monet5/sql_optimizer.c
b/sql/backends/monet5/sql_optimizer.c
--- a/sql/backends/monet5/sql_optimizer.c
+++ b/sql/backends/monet5/sql_optimizer.c
@@ -120,7 +120,6 @@ static size_t SQLgetStatistics(Client cn
cnt = BATcount(b);
if( mode == 0) {
space += getBatSpace(b);
- //mnstr_printf(GDKout,
"#space estimate %s.%s.%s mode %d "LLFMT"\n",sname,tname,cname, mode,
getBatSpace(b));
}
BBPunfix(b->batCacheid);
}
@@ -141,7 +140,6 @@ static size_t SQLgetStatistics(Client cn
cnt = BATcount(b);
if( mode == 0) {
space += getBatSpace(b);
- //mnstr_printf(GDKout,
"#space estimate %s.%s.%s mode %d "LLFMT"\n",sname,tname,cname, mode,
getBatSpace(b));
}
BBPunfix(b->batCacheid);
}
@@ -150,6 +148,7 @@ static size_t SQLgetStatistics(Client cn
mt_member = c->t->p->base.id;
}
}
+ //mnstr_printf(GDKerr, "#space estimate after %s.%s.%s
mode %d "SZFMT"\n",sname,tname,cname, mode, space);
if (rows > 1 && mode != RD_INS)
setRowCnt(mb,k,rows);
if (mt_member && mode != RD_INS)
@@ -192,7 +191,7 @@ addOptimizers(Client c, MalBlkPtr mb, ch
space = SQLgetStatistics(c, be->mvc, mb);
if(space && (pipe == NULL || strcmp(pipe,"default_pipe")== 0)){
- if( space > MT_npages() * MT_pagesize()){
+ if( space > (size_t)(0.8 * MT_npages() * MT_pagesize()) ){
pipe = "volcano_pipe";
mnstr_printf(GDKout, "#use volcano optimizer pipeline?
"SZFMT"\n", space);
}else
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list