Changeset: 49762f4a0fe6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/49762f4a0fe6
Modified Files:
        sql/backends/monet5/bin_partition_by_slice.c
Branch: default
Log Message:

use crude correlated weight


diffs (37 lines):

diff --git a/sql/backends/monet5/bin_partition_by_slice.c 
b/sql/backends/monet5/bin_partition_by_slice.c
--- a/sql/backends/monet5/bin_partition_by_slice.c
+++ b/sql/backends/monet5/bin_partition_by_slice.c
@@ -348,12 +348,14 @@ rel_groupby_prepare_pp(list **aggrresult
                                return NULL;
                        append(*serializedresults, s);
                }
+               dbl corr_weight= 0.85;
                for(node *n = gbexps->h; n; n = n->next ) {
                        sql_exp *e = n->data;
                        sql_subtype *t = exp_subtype(e);
                        /* ext */
                        lng ncard = exp_getcard(be->mvc, rel, e);
-                       card *= ncard;
+                       card *= ncard * corr_weight;
+                       corr_weight *= 0.85;
                        if (card > estimate || ncard >= estimate)
                                card = estimate;
 
@@ -840,6 +842,7 @@ rel_groupby_partition(mvc *sql, sql_rel 
        BUN est = get_rel_count(rel->l);
 
        lng estimate, card = 1;
+       dbl corr_weight= 0.85;
        if (est == BUN_NONE
 #if SIZEOF_BUN == SIZEOF_LNG
                || (ulng) est > (ulng) GDK_lng_max
@@ -853,7 +856,8 @@ rel_groupby_partition(mvc *sql, sql_rel 
                for( node *n = l->h; n; n = n->next ) {
                        sql_exp *e = n->data;
                        lng ncard = exp_getcard(sql, rel, e);
-                       card *= ncard; /* TODO check for overflow */
+                       card *= ncard * corr_weight; /* TODO check for overflow 
*/
+                       corr_weight *= 0.85;
                        if (card > estimate || ncard >= estimate) {
                                card = estimate;
                                break;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to