Update of /cvsroot/monetdb/sql/src/server
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv469/src/server
Modified Files:
Tag: Nov2009
rel_optimizer.mx
Log Message:
merge join expressions from the select operators into the join
operators. This improves the join reorder code (solving a performance
problem with ssb q 11)
Index: rel_optimizer.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_optimizer.mx,v
retrieving revision 1.71.2.8
retrieving revision 1.71.2.9
diff -u -d -r1.71.2.8 -r1.71.2.9
--- rel_optimizer.mx 7 Jan 2010 15:18:51 -0000 1.71.2.8
+++ rel_optimizer.mx 17 Jan 2010 09:47:36 -0000 1.71.2.9
@@ -1785,7 +1785,7 @@
return rel_merge_projects(changes, sql, rel);
/* merge select and cross product ? */
- if (rel->op == op_select && r && r->op == op_join &&
list_empty(r->exps) && !(rel_is_ref(r))) {
+ if (rel->op == op_select && r && r->op == op_join && !(rel_is_ref(r))) {
list *exps = rel->exps;
if (!r->exps)
@@ -1987,7 +1987,6 @@
l->l = NULL;
rel_destroy(l);
(*changes)++;
- return rel;
}
}
if ((is_join(rel->op) || is_semi(rel->op) || is_set(rel->op)) &&
rel->r) {
@@ -1998,9 +1997,12 @@
r->l = NULL;
rel_destroy(r);
(*changes)++;
- return rel;
}
}
+ if (is_join(rel->op) && rel->exps && list_length(rel->exps) == 0) {
+ list_destroy(rel->exps);
+ rel->exps = NULL;
+ }
return rel;
}
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins