Changeset: 6905db51c459 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6905db51c459
Modified Files:
        monetdb5/optimizer/opt_projectionpath.c
        monetdb5/optimizer/opt_remap.c
Branch: default
Log Message:

Invest to avoid work in the optimizers


diffs (55 lines):

diff --git a/monetdb5/optimizer/opt_projectionpath.c 
b/monetdb5/optimizer/opt_projectionpath.c
--- a/monetdb5/optimizer/opt_projectionpath.c
+++ b/monetdb5/optimizer/opt_projectionpath.c
@@ -32,6 +32,7 @@ OPTprojectionPrefix(Client cntxt, MalBlk
        int limit, slimit;
        str msg = MAL_SUCCEED;
 
+
        old = mb->stmt;
        limit = mb->stop;
        slimit= mb->ssize;
@@ -148,6 +149,15 @@ OPTprojectionpathImplementation(Client c
                //return 0;
 
 
+       for( i = 0; i < mb->stop ; i++){
+               p = getInstrPtr(mb,i);
+               if ( getFunctionId(p) == projectionpathRef ){
+                       break;
+               }
+       }
+       if ( i == mb->stop){
+               goto wrapupall;
+       }
 
        old= mb->stmt;
        limit= mb->stop;
diff --git a/monetdb5/optimizer/opt_remap.c b/monetdb5/optimizer/opt_remap.c
--- a/monetdb5/optimizer/opt_remap.c
+++ b/monetdb5/optimizer/opt_remap.c
@@ -380,6 +380,16 @@ OPTremapImplementation(Client cntxt, Mal
        char buf[256];
        str msg = MAL_SUCCEED;
 
+       for( i=0; i< mb->stop; i++){
+               p = getInstrPtr(mb, i);
+               if (isMultiplex(p)){
+                       break;
+               }
+       }
+       if( i == mb->stop){
+               goto wrapup;
+       }
+
        (void) pci;
        old = mb->stmt;
        limit = mb->stop;
@@ -488,6 +498,7 @@ OPTremapImplementation(Client cntxt, Mal
        if (!msg)
                msg = chkDeclarations(mb);
     }
+wrapup:
     /* keep all actions taken as a post block comment */
        usec = GDKusec()- usec;
     snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " usec","remap",doit, 
usec);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to