Changeset: 9bffe87491f9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9bffe87491f9 Modified Files: monetdb5/optimizer/opt_constants.c Branch: Jul2017 Log Message:
crude hack to reduce cost of constant optimizer (ie if 100 constants are found stop finding more..) diffs (40 lines): diff --git a/monetdb5/optimizer/opt_constants.c b/monetdb5/optimizer/opt_constants.c --- a/monetdb5/optimizer/opt_constants.c +++ b/monetdb5/optimizer/opt_constants.c @@ -50,7 +50,7 @@ OPTconstantsImplementation(Client cntxt, for (i=0; i< mb->vtop; i++) alias[ i]= i; - for (i=0; i< mb->vtop; i++) + for (i=0; i< mb->vtop && n < 100; i++) if ( isVarConstant(mb,i) && isVarFixed(mb,i) && getVarType(mb,i) != TYPE_ptr){ x= getVar(mb,i); fnd = 0; @@ -81,12 +81,13 @@ OPTconstantsImplementation(Client cntxt, } } - if( actions) + if (actions) for (i = 0; i < mb->stop; i++){ p= getInstrPtr(mb,i); for (k=0; k < p->argc; k++) getArg(p,k) = alias[getArg(p,k)]; } + /* Defense line against incorrect plans */ /* Plan remains unaffected */ //chkTypes(cntxt->fdout, cntxt->nspace, mb, FALSE); @@ -95,9 +96,9 @@ OPTconstantsImplementation(Client cntxt, /* keep all actions taken as a post block comment */ usec = GDKusec()- usec; - snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " usec","constants",actions,usec); - newComment(mb,buf); - if( actions >= 0) + snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " usec","constants",actions,usec); + newComment(mb,buf); + if (actions >= 0) addtoMalBlkHistory(mb); wrapup: _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list